diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 33280583..72ba6c35 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -81,6 +81,7 @@ Changed - Move user dropdown link logic in ``AppLinkContent`` (#1381, #1413) - Do not recreate ``AppSetting`` objects on remote sync update (#1409) - Enforce project and site uniqueness in ``RemoteProject`` model (#1433) + - Remove redundant permission check in ``project_detail.html`` (#1438) - **Sodarcache** - Rewrite REST API views (#498, #1389) - Raise ``update_cache()`` exception for ``synccache`` in debug mode (#1375) diff --git a/projectroles/templates/projectroles/project_detail.html b/projectroles/templates/projectroles/project_detail.html index 4b0249cc..feac3c16 100644 --- a/projectroles/templates/projectroles/project_detail.html +++ b/projectroles/templates/projectroles/project_detail.html @@ -9,114 +9,106 @@ {% block projectroles %} -{% has_perm 'projectroles.view_project' request.user object as can_view_project %} {% has_perm 'projectroles.update_project' request.user object as can_update_project %} {% sodar_constant 'PROJECT_TYPE_CATEGORY' as PROJECT_TYPE_CATEGORY %} -{% if can_view_project %} - {% include 'projectroles/_project_header.html' %} +{% include 'projectroles/_project_header.html' %} -
- {# Links to remote projects #} - {% if object.type == 'PROJECT' %} - {% if target_projects %} -
-
-

- - {% get_display_name object.type title=True %} on Other Sites -

-
-
- {% for rp in target_projects %} - {% include 'projectroles/_remote_project_link.html' with site=rp.site %} - {% endfor %} -
+
+ {# Links to remote projects #} + {% if object.type == 'PROJECT' %} + {% if target_projects %} +
+
+

+ + {% get_display_name object.type title=True %} on Other Sites +

- {% elif object.is_remote %} -
-
-

- - {% get_display_name object.type title=True %} on Other Sites -

-
-
- {% include 'projectroles/_remote_project_link.html' with site=object.get_source_site %} - {% for rp in peer_projects %} - {% include 'projectroles/_remote_project_link.html' with site=rp.site %} - {% endfor %} -
+
+ {% for rp in target_projects %} + {% include 'projectroles/_remote_project_link.html' with site=rp.site %} + {% endfor %}
- {% endif %} - {% endif %} - - {# README #} -
-
-

ReadMe

-
- {% if object.readme.rendered|length > 0 %} - {% autoescape off %} - {% render_markdown object.readme.raw %} - {% endautoescape %} - {% else %} -

- No ReadMe is currently set for this {% get_display_name object.type title=False %}. - {% if can_update_project %} - You can update the ReadMe here. - {% endif %} -

- {% endif %} + {% elif object.is_remote %} +
+
+

+ + {% get_display_name object.type title=True %} on Other Sites +

+
+
+ {% include 'projectroles/_remote_project_link.html' with site=object.get_source_site %} + {% for rp in peer_projects %} + {% include 'projectroles/_remote_project_link.html' with site=rp.site %} + {% endfor %} +
-
- - {# Subprojects #} - {% if object.type == 'CATEGORY' %} - {% include 'projectroles/_project_list.html' with parent=object %} {% endif %} + {% endif %} - {# App Plugin Cards #} - {% for plugin in app_plugins %} - {% is_app_visible plugin project request.user as app_visible %} - {% if app_visible %} -
-
-

- - {% if plugin.details_title %} - {{ plugin.details_title }} - {% else %} - {{ plugin.title }} - {% endif %} - - {% get_info_link plugin.description as info_link %} - {{ info_link | safe }} - -

-
- {% if plugin.details_template %} -
- {% include plugin.details_template %} -
- {% else %} -
-

No app card template found

-
+ {# README #} +
+
+

ReadMe

+
+
+ {% if object.readme.rendered|length > 0 %} + {% autoescape off %} + {% render_markdown object.readme.raw %} + {% endautoescape %} + {% else %} +

+ No ReadMe is currently set for this {% get_display_name object.type title=False %}. + {% if can_update_project %} + You can update the ReadMe here. {% endif %} -

+

{% endif %} - {% endfor %} +
-{% else %} - -{% endif %} + {# Subprojects #} + {% if object.type == 'CATEGORY' %} + {% include 'projectroles/_project_list.html' with parent=object %} + {% endif %} + + {# App Plugin Cards #} + {% for plugin in app_plugins %} + {% is_app_visible plugin project request.user as app_visible %} + {% if app_visible %} +
+
+

+ + {% if plugin.details_title %} + {{ plugin.details_title }} + {% else %} + {{ plugin.title }} + {% endif %} + + {% get_info_link plugin.description as info_link %} + {{ info_link | safe }} + +

+
+ {% if plugin.details_template %} +
+ {% include plugin.details_template %} +
+ {% else %} +
+

No app card template found

+
+ {% endif %} +
+ {% endif %} + {% endfor %} +
{% endblock projectroles %}