FreedomBox/plinth/templates/package_install.html
fonfon e905d1a8f2 packagekit: use TemplateView instead of FormView
For the installation procedure a TemplateView is sufficient, and the user
won't be able to edit any form-data on the client-side.
2015-01-05 00:27:45 +05:30

80 lines
2.1 KiB
HTML

{% extends "base.html" %}
{% comment %}
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
{% endcomment %}
{% load bootstrap %}
{% block page_head %}
{% if is_installing %}
<meta http-equiv="refresh" content="3" />
{% endif %}
{% endblock %}
{% block content %}
<h2>Installation</h2>
{% if not is_installing %}
<p>This feature requires addtional packages to be installed. Do you
wish to install them?</p>
<table class="table">
<thead>
<tr><th>Package</th><th>Summary</th></tr>
</thead>
<tbody>
{% for package in packages %}
<tr>
<td>{{ package.get_name }}</td>
<td>{{ package.get_summary }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<form action="" method="post">
{% csrf_token %}
<input type="submit" class="btn btn-md btn-primary" value="Install" />
</form>
{% else %}
{% for key, transaction in transactions.items %}
<div>Installing {{ transaction.package_names|join:", " }}:
{{ transaction.status_string }}
</div>
<div class="progress">
<div class="progress-bar progress-bar-striped active"
role="progressbar" aria-valuemin="0" aria-valuemax="100"
aria-valuenow="{{ transaction.percentage }}"
style="width: {{ transaction.percentage }}%">
<span class="sr-only">{{ transaction.percentage }}% complete</span>
</div>
</div>
{% endfor %}
{% endif %}
{% endblock %}