teamgrav icon in theme/plugin views

This commit is contained in:
Andy Miller
2015-07-27 19:33:52 -06:00
parent 563cda4109
commit 80d672a649
8 changed files with 32 additions and 1 deletions

View File

@@ -509,4 +509,13 @@ class Admin
{
return dirname('/' . Grav::instance()['admin']->route);
}
public function isTeamGrav($info)
{
if (isset($info['author']['name']) && $info['author']['name'] == 'Team Grav') {
return true;
} else {
return false;
}
}
}

View File

@@ -74,6 +74,9 @@ b, strong {
background: #9055AF;
color: #fff; }
.info-reverse {
color: #9055AF; }
.notice {
background: #2693B7;
color: #fff; }

File diff suppressed because one or more lines are too long

View File

@@ -66,6 +66,10 @@ b, strong {
color: $info-fg;
}
.info-reverse {
color: $info-bg;
}
.notice {
background: $tertiary-accent-bg;
color: $tertiary-accent-fg;

View File

@@ -14,6 +14,9 @@
<h1>
{{ plugin.name|e }}
{% if admin.isTeamGrav(plugin) %}
<small><span class="info-reverse"><i class="fa fa-check-circle"></i></span></small>
{% endif %}
{% if plugin.symlink %}
<small class="hint--bottom" data-hint="This plugin is symbolically linked. Updates won't be detected.">
<i class="fa fa-fw fa-link"></i>

View File

@@ -9,16 +9,22 @@
{% set plugin = package.toArray() %}
{% set data = admin.data('plugins/' ~ slug) %}
{{ dump(plugin) }}
<tr data-gpm-plugin="{{ slug|url_encode }}">
<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>
{% if admin.isTeamGrav(plugin) %}
<small><span class="info-reverse"><i class="fa fa-check-circle"></i></span></small>
{% endif %}
{% if plugin.symlink %}
<span class="hint--bottom" data-hint="This plugin is symbolically linked. Updates won't be detected.">
<i class="fa fa-fw fa-link"></i>
</span>
{% endif %}
<span class="gpm-version">v{{ plugin.version }}</span>
</td>
<td class="gpm-actions">
{% if (not installing and plugin.form.fields.enabled) %}

View File

@@ -14,6 +14,9 @@
<h1>
{{ theme.name|e }}
{% if admin.isTeamGrav(theme) %}
<small><span class="info-reverse"><i class="fa fa-check-circle"></i></span></small>
{% endif %}
{% if theme.symlink %}
<small class="hint--bottom" data-hint="This theme is symbolically linked. Updates won't be detected.">
<i class="fa fa-fw fa-link"></i>

View File

@@ -12,6 +12,9 @@
<div class="gpm-name">
<i class="fa fa-fw fa-{{ theme.icon }}"></i>
<a href="{{ base_url_relative }}/themes/{{ slug|url_encode }}">{{ theme.name }}</a>
{% if admin.isTeamGrav(theme) %}
<small><span class="info-reverse"><i class="fa fa-check-circle"></i></span></small>
{% endif %}
{% if theme.symlink %}
<span class="hint--bottom" data-hint="This theme is symbolically linked. Updates won't be detected.">
<i class="fa fa-fw fa-link"></i>