diff --git a/qgis-app/plugins/templates/plugins/plugin_detail.html b/qgis-app/plugins/templates/plugins/plugin_detail.html index 20d4b7be..eae28fab 100644 --- a/qgis-app/plugins/templates/plugins/plugin_detail.html +++ b/qgis-app/plugins/templates/plugins/plugin_detail.html @@ -144,350 +144,355 @@ {% endblock %} {% block content %} -
-
- {% if object.icon and object.icon.file and object.icon|is_image_valid %} - {% with image_extension=object.icon.name|file_extension %} - {% if image_extension == 'svg' %} - {% trans - {% else %} - {% thumbnail object.icon "128x128" upscale=False format="PNG" as im %} - {% trans - {% endthumbnail %} - {% endif %} - {% endwith %} - {% else %} - {% trans - {% endif %} -
-
-

- {{ object.name }} -

-
- {% trans "Plugin ID:" %} {{ object.pk }} -
- +
+
+
+ {% if object.icon and object.icon.file and object.icon|is_image_valid %} + {% with image_extension=object.icon.name|file_extension %} + {% if image_extension == 'svg' %} + {% trans + {% else %} + {% thumbnail object.icon "128x128" upscale=False format="PNG" as im %} + {% trans + {% endthumbnail %} + {% endif %} + {% endwith %} + {% else %} + {% trans + {% endif %} +
+
+

+ {{ object.name }} +

+
+ {% trans "Plugin ID:" %} {{ object.pk }} +
+ +
+

{{ object.description|safe|linebreaksbr }}

+
({% firstof votes '0' %}) {% trans "votes" %} 
+ + +  {% trans "Download latest" %} +
-

{{ object.description|safe|linebreaksbr }}

-
({% firstof votes '0' %}) {% trans "votes" %} 
- - -  {% trans "Download latest" %} -
-
-
- {% if not object.experimental and not object.stable %} -
-

{% trans "This plugin has no public version yet." %}

-
- {% endif %} - - {% if not object.created_by.is_active %} -
-

{% trans "The plugin maintainer has been blocked." %}

-
- {% endif %} - - {% if object.deprecated %} -
-

{% trans "This plugin is deprecated!" %}

-
- {% endif %} - - - {% if user.is_staff or user in object.editors %} -
-
- {% csrf_token %} -
-

- - - - - {% trans "Edit" %} - -

-

- - - - - {% trans "Add version" %} - -

-

- - - - - {% trans "Tokens" %} - -

- {% if user.is_staff %} +
+ {% if not object.experimental and not object.stable %} +
+

{% trans "This plugin has no public version yet." %}

+
+ {% endif %} + + {% if not object.created_by.is_active %} +
+

{% trans "The plugin maintainer has been blocked." %}

+
+ {% endif %} + + {% if object.deprecated %} +
+

{% trans "This plugin is deprecated!" %}

+
+ {% endif %} + + + {% if user.is_staff or user in object.editors %} +
+ + {% csrf_token %} +

- {% if object.featured %} - - {% else %} - - {% endif %} + + + + + {% trans "Edit" %} +

- {% endif %} - {% if user.is_staff or user in object.editors %}

- + - + - {% trans "Delete" %} + {% trans "Add version" %}

- {% endif %} -
- -
- {% endif %} - -
-
- -
-
- {% if object.about %} -
-

{{ object.about|safe|linebreaksbr }}

+

+ + + + + {% trans "Tokens" %} + +

+ {% if user.is_staff %} +

+ {% if object.featured %} + + {% else %} + + {% endif %} +

+ {% endif %} + {% if user.is_staff or user in object.editors %} +

+ + + + + {% trans "Delete" %} + +

+ {% endif %} +
+
{% endif %} -
- {% if object.server %} -
{% trans "This plugin provides an interface for QGIS Server." %}
- {% endif %} - - - - {% if object.author %} - - - - - {% endif %} - - {% if object.email and not user.is_anonymous %} - - - - - {% endif %} - - {% if object.display_created_by %} - - - - - {% endif %} - - - - - - - {% if object.owners.count %} - - - - - {% endif %} - - {% if object.tags.count %} - - - - - {% endif %} - - {% if object.homepage %} - - - - - {% endif %} - - {% if object.tracker %} - - - - - {% endif %} - - {% if object.repository %} - - - - - {% endif %} - - {% if object.stable %} - - - - - {% endif %} - - {% if object.experimental %} - - - - - {% endif %} - - {% if object.pk %} - - - - - {% endif %} - -
{% trans "Author" %} - {{ object.author }} -
{% trans "Author's email" %}{{ object.email }}
{% trans "Created by" %} - {{ object.created_by }} -
{% trans "Maintainer" %} - {{ object.maintainer }} -
{% trans "Collaborators" %} - {% for owner in object.owners.all %} - {{ owner.username }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
{% trans "Tags" %} - {% for tag in object.tags.all %} - {{tag}} - {% endfor %} -
{% trans "Plugin home page" %}{{ object.homepage }}
{% trans "Tracker" %}{% trans "Browse and report bugs" %}
{% trans "Code repository" %}{{ object.repository }}
{% trans "Latest stable version" %}{{ object.stable.version }}
{% trans "Latest experimental version" %}{{ object.experimental.version }}
{% trans "Plugin ID" %} - {{ object.pk }} -
- -
-
+ +
+
+
-
- {% if object.pluginversion_set.count %} -
- - +
+ {% if object.about %} +
+

{{ object.about|safe|linebreaksbr }}

+
+ {% endif %} +
+ {% if object.server %} +
{% trans "This plugin provides an interface for QGIS Server." %}
+ {% endif %} + +
+ + {% if object.author %} - - {% if not user.is_anonymous %}{% endif %} - - - - - - - {% if user.is_staff or user in object.approvers or user in object.editors %}{% endif %} + + - - - {% for version in object.pluginversion_set.all %} - {% if version.approved or not user.is_anonymous %} + {% endif %} + + {% if object.email and not user.is_anonymous %} - - {% if not user.is_anonymous %} + + + + {% endif %} + + {% if object.display_created_by %} + + - {% endif %} + + {% endif %} + + + - - - - {% if version.is_from_token %} - - {% else %} - - {% endif %} - - {% if user.is_staff or user in version.plugin.approvers or user in version.plugin.editors %} + + + {% if object.owners.count %} + + + + + {% endif %} + + {% if object.tags.count %} + + + + {% endif %} + + {% if object.homepage %} + + + + + {% endif %} + + {% if object.tracker %} + + + + + {% endif %} + + {% if object.repository %} + + + + + {% endif %} + + {% if object.stable %} + + + + + {% endif %} + + {% if object.experimental %} + + + + + {% endif %} + + {% if object.pk %} + + + + + {% endif %} + +
{% trans "Version" %}{% trans "Min QGIS v." %}{% trans "Max QGIS v." %} {% trans "Date" %} {% trans "Manage" %}{% trans "Author" %} + {{ object.author }} +
{{ version.version }}{% trans "Author's email" %}{{ object.email }}
{% trans "Created by" %} - {% if version.approved %} - - {% else %} - - {% endif %} + {{ object.created_by }}
{% trans "Maintainer" %} - {% if version.experimental %} - - {% else %} - - {% endif %} + {{ object.maintainer }} {{ version.min_qg_version }}{{ version.max_qg_version }}{{ version.downloads }}Token {{ version.token.description|default:"" }}{{ version.created_by }}{{ version.created_on|local_timezone }}
{% trans "Collaborators" %} + {% for owner in object.owners.all %} + {{ owner.username }}{% if not forloop.last %}, {% endif %} + {% endfor %} +
{% trans "Tags" %} -
{% csrf_token %} - {% if user.is_staff or user in version.plugin.approvers %} - {% if not version.approved %} -
{% trans "Plugin home page" %}{{ object.homepage }}
{% trans "Tracker" %}{% trans "Browse and report bugs" %}
{% trans "Code repository" %}{{ object.repository }}
{% trans "Latest stable version" %}{{ object.stable.version }}
{% trans "Latest experimental version" %}{{ object.experimental.version }}
{% trans "Plugin ID" %} + {{ object.pk }} +
+ +
+
+
+
+ {% if object.pluginversion_set.count %} +
+ + + + + {% if not user.is_anonymous %}{% endif %} + + + + + + + {% if user.is_staff or user in object.approvers or user in object.editors %}{% endif %} + + + + {% for version in object.pluginversion_set.all %} + {% if version.approved or not user.is_anonymous %} + + + {% if not user.is_anonymous %} + + {% endif %} + + + + + {% if version.is_from_token %} + + {% else %} + {% endif %} - - - {% if version.feedback|feedbacks_not_completed|length >= 2 %} - {{ version.feedback|feedbacks_not_completed|length }} + + {% if user.is_staff or user in version.plugin.approvers or user in version.plugin.editors %} + {% endif %} - - + {% endif %} - - {% endif %} - {% endfor %} - -
{% trans "Version" %}{% trans "Min QGIS v." %}{% trans "Max QGIS v." %} {% trans "Date" %} {% trans "Manage" %}
+ + {{ version.version }} + + {% if version.approved %} + + {% else %} + + {% endif %} + + {% if version.experimental %} + {% else %} - + {% endif %} + {{ version.min_qg_version }}{{ version.max_qg_version }}{{ version.downloads }}Token {{ version.token.description|default:"" }}{{ version.created_by }}{{ version.created_on|local_timezone }} + {% csrf_token %} + {% if user.is_staff or user in version.plugin.approvers %} + {% if not version.approved %} + + {% else %} + + {% endif %} {% endif %} - - {% if user.is_staff or user in version.plugin.editors %} - - + + + {% if version.feedback|feedbacks_not_completed|length >= 2 %} + {{ version.feedback|feedbacks_not_completed|length }} + {% endif %} + + {% if user.is_staff or user in version.plugin.editors %} + + + {% endif %} + +
+ {% endfor %} + + +
+ {% endif %} +
+ {% if user.is_staff or user in object.editors %} +
+
{% endif %} -
- {% if user.is_staff or user in object.editors %} -
-
- {% endif %}
{% endblock %} diff --git a/qgis-app/plugins/urls.py b/qgis-app/plugins/urls.py index e7b2d636..bfe9fea9 100644 --- a/qgis-app/plugins/urls.py +++ b/qgis-app/plugins/urls.py @@ -365,7 +365,7 @@ url( r"^(?P[A-Za-z][A-Za-z0-9-_]+)/$", PluginDetailView.as_view( - slug_url_kwarg="package_name", slug_field="package_name" + slug_url_kwarg="package_name", slug_field="package_name", ), name="plugin_detail", ), diff --git a/qgis-app/plugins/views.py b/qgis-app/plugins/views.py index 57ef6a8e..1f643fa7 100644 --- a/qgis-app/plugins/views.py +++ b/qgis-app/plugins/views.py @@ -513,6 +513,7 @@ def plugin_upload(request): class PluginDetailView(DetailView): model = Plugin queryset = Plugin.objects.all() + title = _("Plugin details") @method_decorator(ensure_csrf_cookie) def dispatch(self, *args, **kwargs): @@ -542,6 +543,7 @@ def get_context_data(self, **kwargs): "stats_url": stats_url, "rating": plugin.rating.get_rating(), "votes": plugin.rating.votes, + "title": self.title, } ) return context diff --git a/qgis-app/static/style/scss/style.scss b/qgis-app/static/style/scss/style.scss index 9b13d70c..01af1625 100644 --- a/qgis-app/static/style/scss/style.scss +++ b/qgis-app/static/style/scss/style.scss @@ -19,6 +19,13 @@ mark { color: $text-primary2; } +.box-content { + background: $white; + border-radius: 10px; + padding: 2rem; + box-shadow: 0rem 0rem 1rem rgba(204, 210, 214, 0.5294117647); +} + h2 { font-size: 3rem; font-weight: 600; diff --git a/qgis-app/static/style/style.css b/qgis-app/static/style/style.css index 68819f06..75c27b5f 100644 --- a/qgis-app/static/style/style.css +++ b/qgis-app/static/style/style.css @@ -53,10 +53,6 @@ div.tag_cloud a { width: inherit !important; } -img.plugin-icon { - max-width: inherit; -} - label.required:after { content:" *"; color: red; } /* HUB style */