plugin.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load form_helpers %}
  4. {% load i18n %}
  5. {% load render_table from django_tables2 %}
  6. {% block title %}<img class="plugin-icon" src="{{ plugin.icon_url }}">&nbsp;{{ plugin.title_long }}{% endblock %}
  7. {% block object_identifier %}
  8. {% endblock object_identifier %}
  9. {% block breadcrumbs %}
  10. <li class="breadcrumb-item"><a href="{% url 'core:plugin_list' %}">{% trans "Plugins" %}</a></li>
  11. {% endblock breadcrumbs %}
  12. {% block subtitle %}
  13. <span class="text-secondary fs-5">
  14. {% checkmark plugin.is_installed %}
  15. {% if plugin.is_installed %}
  16. v{{ plugin.installed_version }} {% trans "installed" %}
  17. {% else %}
  18. {% trans "Not installed" %}
  19. {% endif %}
  20. </span>
  21. {% endblock %}
  22. {% block controls %}{% endblock %}
  23. {% block tabs %}
  24. <ul class="nav nav-tabs" role="tablist">
  25. <li class="nav-item" role="presentation">
  26. <a class="nav-link active" id="overview-tab" data-bs-toggle="tab" data-bs-target="#overview" type="button" role="tab" aria-controls="edit-form" aria-selected="true">
  27. {% trans "Overview" %}
  28. </a>
  29. </li>
  30. {% if not plugin.is_local and not settings.RELEASE.features.commercial %}
  31. <li class="nav-item" role="presentation">
  32. <button class="nav-link" id="install-tab" data-bs-toggle="tab" data-bs-target="#install" type="button" role="tab" aria-controls="object-list" aria-selected="false">
  33. {% trans "Install" %}
  34. </button>
  35. </li>
  36. {% endif %}
  37. </ul>
  38. {% endblock tabs %}
  39. {% block content %}
  40. <div class="tab-pane show active" id="overview" role="tabpanel" aria-labelledby="overview-tab">
  41. <div class="row">
  42. <div class="col col-6">
  43. <div class="card">
  44. <h2 class="card-header">{% trans "Plugin Details" %}</h2>
  45. <table class="table table-hover attr-table">
  46. <tr>
  47. <th scope="row">{% trans "Name" %}</th>
  48. <td>{{ plugin.title_long }}</td>
  49. </tr>
  50. <tr>
  51. <th scope="row">{% trans "Summary" %}</th>
  52. <td>{{ plugin.tag_line|placeholder }}</td>
  53. </tr>
  54. <tr>
  55. <th scope="row">{% trans "Author" %}</th>
  56. <td>{{ plugin.author.name|placeholder }}</td>
  57. </tr>
  58. <tr>
  59. <th scope="row">{% trans "URL" %}</th>
  60. <td>
  61. {% if plugin.homepage_url %}
  62. <a href="{{ plugin.homepage_url }}">{{ plugin.homepage_url }}</a>
  63. {% else %}
  64. {{ ''|placeholder }}
  65. {% endif %}
  66. </td>
  67. </tr>
  68. <tr>
  69. <th scope="row">{% trans "License" %}</th>
  70. <td>{{ plugin.license_type|placeholder }}</td>
  71. </tr>
  72. <tr>
  73. <th scope="row">{% trans "Description" %}</th>
  74. <td>{{ plugin.description_short|markdown }}</td>
  75. </tr>
  76. <tr>
  77. <th scope="row">{% trans "Certified" %}</th>
  78. <td>{% checkmark plugin.is_certified %}</td>
  79. </tr>
  80. <tr>
  81. <th scope="row">{% trans "Local" %}</th>
  82. <td>{% checkmark plugin.is_local %}</td>
  83. </tr>
  84. </table>
  85. </div>
  86. </div>
  87. <div class="col col-6">
  88. <div class="card">
  89. <h2 class="card-header">{% trans "Version History" %}</h2>
  90. <div class="table-responsive">
  91. {% render_table table 'inc/table.html' %}
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. {% if not plugin.is_local and not settings.RELEASE.features.commercial %}
  98. <div class="tab-pane" id="install" role="tabpanel" aria-labelledby="install-tab">
  99. <div class="card">
  100. <h2 class="card-header">{% trans "Local Installation Instructions" %}</h2>
  101. <div class="card-body">
  102. {% include 'core/inc/plugin_installation.html' %}
  103. </div>
  104. </div>
  105. </div>
  106. {% endif %}
  107. {% endblock content %}