Display plugins in two columns

This commit is contained in:
Raphael Michel
2016-07-28 20:25:02 +02:00
parent f91c95b1bc
commit eb72c2d549
@@ -11,52 +11,56 @@
{% trans "Your changes have been saved." %} {% trans "Your changes have been saved." %}
</div> </div>
{% endif %} {% endif %}
{% for plugin in plugins %} <div class="row">
<div class="panel panel-{% if plugin.app.compatibility_errors %}warning{% elif plugin.module in plugins_active %}success{% else %}default{% endif %}"> {% for plugin in plugins %}
<div class="panel-heading"> <div class="col-md-6 col-sm-12">
<div class="row"> <div class="panel panel-{% if plugin.app.compatibility_errors %}warning{% elif plugin.module in plugins_active %}success{% else %}default{% endif %}">
<div class="col-sm-10"> <div class="panel-heading">
<h3 class="panel-title">{{ plugin.name }}</h3> <div class="row">
</div> <div class="col-sm-8">
<div class="col-sm-2"> <h3 class="panel-title">{{ plugin.name }}</h3>
</div>
<div class="col-sm-4">
{% if plugin.app.compatibility_errors %}
<button class="btn disabled btn-block btn-default">{% trans "Incompatible" %}</button>
{% elif plugin.module in plugins_active %}
<button class="btn btn-default btn-block" name="plugin:{{ plugin.module }}" value="disable">{% trans "Disable" %}</button>
{% else %}
<button class="btn btn-primary btn-block" name="plugin:{{ plugin.module }}" value="enable">{% trans "Enable" %}</button>
{% endif %}
</div>
</div>
</div>
<div class="panel-body">
<p class="meta">{% blocktrans trimmed with v=plugin.version a=plugin.author %}
Version {{ v }} by <em>{{ a }}</em>
{% endblocktrans %}</p>
<p>{{ plugin.description }}</p>
{% if plugin.app.compatibility_errors %} {% if plugin.app.compatibility_errors %}
<button class="btn disabled btn-block btn-default">{% trans "Incompatible" %}</button> <div class="alert alert-warning">
{% elif plugin.module in plugins_active %} {% trans "This plugin cannot be enabled for the following reasons:" %}
<button class="btn btn-default btn-block" name="plugin:{{ plugin.module }}" value="disable">{% trans "Disable" %}</button> <ul>
{% else %} {% for e in plugin.app.compatibility_errors %}
<button class="btn btn-primary btn-block" name="plugin:{{ plugin.module }}" value="enable">{% trans "Enable" %}</button> <li>{{ e }}</li>
{% endif %} {% endfor %}
</div> </ul>
</div> </div>
</div> {% endif %}
<div class="panel-body"> {% if plugin.app.compatibility_warnings %}
<p class="meta">{% blocktrans trimmed with v=plugin.version a=plugin.author %} <div class="alert alert-warning">
Version {{ v }} by <em>{{ a }}</em> {% trans "This plugin reports the following problems:" %}
{% endblocktrans %}</p> <ul>
<p>{{ plugin.description }}</p> {% for e in plugin.app.compatibility_warnings %}
{% if plugin.app.compatibility_errors %} <li>{{ e }}</li>
<div class="alert alert-warning"> {% endfor %}
{% trans "This plugin cannot be enabled for the following reasons:" %} </ul>
<ul> </div>
{% for e in plugin.app.compatibility_errors %} {% endif %}
<li>{{ e }}</li>
{% endfor %}
</ul>
</div> </div>
{% endif %} </div>
{% if plugin.app.compatibility_warnings %} </div>
<div class="alert alert-warning"> {% endfor %}
{% trans "This plugin reports the following problems:" %} </div>
<ul>
{% for e in plugin.app.compatibility_warnings %}
<li>{{ e }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div>
{% endfor %}
</fieldset> </fieldset>
</form> </form>
{% endblock %} {% endblock %}