plugins-details.html.twig 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% set gpm = admin.gpm() %}
  2. {% set installed = gpm.isPluginInstalled(admin.route) %}
  3. <div class="grav-update plugin" data-gpm-plugin="{{ admin.route }}">
  4. {% if installed and gpm.isPluginUpdatable(admin.route) %}
  5. {% set remote = gpm.getRepositoryPlugin(admin.route) %}
  6. <p>
  7. <i class="fa fa-bullhorn"></i>
  8. <strong>v{{ remote.available }}</strong> {{ "PLUGIN_ADMIN.OF_THIS_PLUGIN_IS_NOW_AVAILABLE"|tu }}!
  9. <button class="button button-small secondary" data-download="{{ remote.zipball_url }}">{{ "PLUGIN_ADMIN.UPDATE_PLUGIN"|tu }}</button>
  10. </p>
  11. {% endif %}
  12. </div>
  13. <h1>
  14. {{ plugin.name|e }}
  15. {% if admin.isTeamGrav(plugin) %}
  16. <small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_PLUGIN"|tu }}"></i></span></small>
  17. {% endif %}
  18. {% if plugin.symlink %}
  19. <small class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.PLUGIN_SYMBOLICALLY_LINKED"|tu }}">
  20. <i class="fa fa-fw fa-link"></i>
  21. </small>
  22. {% endif %}
  23. <small>{{ plugin.version ? 'v' ~ plugin.version|e }}</small>
  24. </h1>
  25. <div class="gpm-item-info">
  26. <i class="gpm-item-icon fa fa-fw fa-{{ plugin.icon }}"></i>
  27. {% include 'partials/plugin-data.html.twig' with { plugin: plugin } %}
  28. </div>
  29. {% if (installed) %}
  30. {% set data = admin.data('plugins/' ~ admin.route) %}
  31. {% include 'partials/blueprints.html.twig' with { data: data, blueprints: data.blueprints } %}
  32. <div class="button-bar danger">
  33. <span class="danger-zone"></span>
  34. <a class="button" href="{{ base_url_relative }}/plugins/{{ plugin.slug }}/task{{ config.system.param_sep }}uninstall"><i class="fa fa-fw fa-warning"></i>{{ "PLUGIN_ADMIN.REMOVE_PLUGIN"|tu }}</a>
  35. </div>
  36. {% else %}
  37. <div class="button-bar success">
  38. <a class="button" href="{{ base_url_relative }}/plugins/{{ plugin.slug }}/task{{ config.system.param_sep }}install"><i class="fa fa-fw fa-plus"></i>{{ "PLUGIN_ADMIN.INSTALL_PLUGIN"|tu }}</a>
  39. </div>
  40. {% endif %}