plugins alerts updated

This commit is contained in:
Andy Miller
2014-10-03 13:54:51 -06:00
parent 09d3b92c90
commit 0f6f923eb1
7 changed files with 56 additions and 34 deletions

View File

@@ -841,11 +841,18 @@ tr {
margin-top: -2rem;
margin-bottom: 2rem; }
#admin-main .grav-update {
height: 3rem;
padding: 0 3rem;
background: #9055AF;
color: #fff; }
#admin-main .grav-update:after {
content: "";
display: table;
clear: both; }
#admin-main .grav-update.plugins {
padding-right: 1rem; }
#admin-main .grav-update .button {
float: right;
margin-top: 0.6rem;
margin-left: 1rem;
line-height: 1.5;
background: #73448c;

File diff suppressed because one or more lines are too long

View File

@@ -152,12 +152,18 @@ $update-height: 3rem;
}
.grav-update {
height: $update-height;
@include clearfix;
padding: 0 $padding-default;
background: $info-bg;
color: $info-fg;
&.plugins {
padding-right: 1rem;
}
.button {
float: right;
margin-top: 0.6rem;
margin-left: 1rem;
line-height: 1.5;
@include button-color(shade($info-bg, 20%));

View File

@@ -1,7 +0,0 @@
<div class="grav-update plugins">
<p>
<i class="fa fa-bullhorn"></i>
One or more of your plugins has an <strong>update available</strong>.
<button class="button button-small secondary">Update All Plugins</button>
</p>
</div>

View File

@@ -1,3 +1,11 @@
<div class="grav-update plugins">
<p>
<i class="fa fa-bullhorn"></i>
Plugin: <strong>{{ plugin.name|e }} v{{ plugin.version }}</strong> is now available!
<button class="button button-small secondary">Update Plugin</button>
</p>
</div>
<h1>
{{ plugin.name|e }}
<small>{{ plugin.version ? 'v' ~ plugin.version|e }}</small>

View File

@@ -0,0 +1,30 @@
<div class="grav-update plugins">
<p>
<i class="fa fa-bullhorn"></i>
One or more of your plugins has an <strong>update available</strong>.
<button class="button button-small secondary">Update All Plugins</button>
</p>
</div>
<h1>
Installed Plugins
</h1>
<table>
{% for slug, package in admin.plugins %}
{% set plugin = package.toArray() %}
{% set data = package.getData() %}
<tr>
<td class="gpm-name">
<i class="fa fa-fw fa-{{ plugin.icon }}"></i>
<a href="{{ base_url_relative }}/plugins/{{ slug|url_encode }}">{{ plugin.name }}</a> <span class="gpm-version">v{{ plugin.version }}</span>
</td>
<td class="gpm-actions">
<a class="{{ plugin.get('enabled') ? 'enabled' : 'disabled' }}" href="{{ base_url_relative }}/plugins/{{ slug }}/task:{{ plugin.get('enabled') ? 'disable' : 'enable' }}">
<i class="fa fa-fw fa-toggle-{{ plugin.get('enabled') ? 'on' : 'off' }}"></i>
</a>
</td>
</tr>
{% endfor %}
</table>

View File

@@ -22,33 +22,11 @@
{% block content %}
<div class="gpm gpm-plugins">
{% include 'partials/messages.html.twig' %}
{% include 'partials/plugin-update.html.twig' %}
{% if not admin.route %}
<h1>
Installed Plugins
</h1>
<table>
{% for slug, package in admin.plugins %}
{% set plugin = package.toArray() %}
{% set data = package.getData() %}
<tr>
<td class="gpm-name">
<i class="fa fa-fw fa-{{ plugin.icon }}"></i>
<a href="{{ base_url_relative }}/plugins/{{ slug|url_encode }}">{{ plugin.name }}</a> <span class="gpm-version">v{{ plugin.version }}</span>
</td>
<td class="gpm-actions">
<a class="{{ plugin.get('enabled') ? 'enabled' : 'disabled' }}" href="{{ base_url_relative }}/plugins/{{ slug }}/task:{{ plugin.get('enabled') ? 'disable' : 'enable' }}">
<i class="fa fa-fw fa-toggle-{{ plugin.get('enabled') ? 'on' : 'off' }}"></i>
</a>
</td>
</tr>
{% endfor %}
</table>
{% include 'partials/plugins-list.html.twig' %}
{% else %}
{% include 'partials/plugins-details.html.twig' %}
{% endif %}