Nodes View: Remove unnecessary containers

#node-container and #node-overlay were not used.
This commit is contained in:
Pablo Vazquez 2018-09-17 14:26:37 +02:00
parent 77f855be3e
commit 1c42e8fd07

View File

@ -1,118 +1,116 @@
| {% block body %} | {% block body %}
#node-container
#node-overlay
| {% block node_preview %} | {% block node_preview %}
| {% if node.picture %} | {% if node.picture %}
| {% if current_user.has_cap('subscriber') or node.permissions.world %} | {% if current_user.has_cap('subscriber') or node.permissions.world %}
section.node-preview.image.js-node-preview-image section.node-preview.image.js-node-preview-image
img.node-preview-thumbnail(src="{{ node.picture.thumbnail('l', api=api) }}") img.node-preview-thumbnail(src="{{ node.picture.thumbnail('l', api=api) }}")
| {% else %} | {% else %}
| {% include 'nodes/custom/_node_preview_forbidden.html' %} | {% include 'nodes/custom/_node_preview_forbidden.html' %}
| {% endif %}
| {% endif %}
| {% endblock node_preview %}
| {% block node_details %}
| {# NAME #}
section.px-4
h4.pt-4.mb-3 {{node.name}}
| {# DESCRIPTION #}
| {% if node.description %}
.node-details-description
| {{ node | markdowned('description') }}
| {% endif %} | {% endif %}
| {% endif %}
| {% endblock node_preview %}
| {% block node_details %} | {# DETAILS #}
section.node-details-meta.pl-4.pr-2.py-2.border-bottom
| {# NAME #} ul.list-unstyled.m-0
section.px-4 | {% if node.properties.license_type %}
h4.pt-4.mb-3 {{node.name}} li.px-2
a.node-details-license(
| {# DESCRIPTION #} href="https://creativecommons.org/licenses/",
| {% if node.description %} target="_blank",
.node-details-description title="{{ node.properties.license_type }} {% if node.properties.license_notes %}{{ node.properties.license_notes }}{% endif %}",
| {{ node | markdowned('description') }} data-toggle="tooltip",
data-placement="top")
i(class="pi-license-{{ node.properties.license_type }}")
| {% endif %} | {% endif %}
| {# DETAILS #} | {% if node.has_method('PUT') and (node.properties.status != 'published') %}
section.node-details-meta.pl-4.pr-2.py-2.border-bottom li.px-2(class="status-{{ node.properties.status }}")
ul.list-unstyled.m-0 | {{ node.properties.status | undertitle }}
| {% if node.properties.license_type %} | {% endif %}
li.px-2
a.node-details-license(
href="https://creativecommons.org/licenses/",
target="_blank",
title="{{ node.properties.license_type }} {% if node.properties.license_notes %}{{ node.properties.license_notes }}{% endif %}",
data-toggle="tooltip",
data-placement="top")
i(class="pi-license-{{ node.properties.license_type }}")
| {% endif %}
| {% if node.has_method('PUT') and (node.properties.status != 'published') %} li.px-2(title="Author")
li.px-2(class="status-{{ node.properties.status }}") | {{ node.user.full_name }}
| {{ node.properties.status | undertitle }} | {{ node.user.badges.html|safe }}
| {% endif %}
li.px-2(title="Author") li.px-2(
| {{ node.user.full_name }} title="Created {{ node._created }} (updated {{ node._updated | pretty_date_time }})")
| {{ node.user.badges.html|safe }} | {{ node._created | pretty_date }}
li.px-2( | {% if node.short_link %}
title="Created {{ node._created }} (updated {{ node._updated | pretty_date_time }})") li.shared
| {{ node._created | pretty_date }} a(href="{{ node.short_link }}")
i.pi-share
| Shared
| {% endif %}
| {% if node.short_link %} li.ml-auto
li.shared
a(href="{{ node.short_link }}")
i.pi-share
| Shared
| {% endif %}
li.ml-auto | {% if node.file %}
li.px-2(title="File size")
| {{ node.file.length | filesizeformat }}
li.px-2.js-type(title="File format")
| {{ node.file.content_type }}
| {% endif %}
| {% if node.file %} | {% if node.permissions.world %}
li.px-2(title="File size") li.public(
| {{ node.file.length | filesizeformat }} data-toggle="tooltip",
li.px-2.js-type(title="File format") data-placement="bottom",
| {{ node.file.content_type }} title="Anybody can download. Share it!")
| {% endif %} i.pi-lock-open
span Public
| {% endif %}
| {% if node.permissions.world %} | {% block node_details_meta_extra %}{% endblock %}
li.public(
data-toggle="tooltip",
data-placement="bottom",
title="Anybody can download. Share it!")
i.pi-lock-open
span Public
| {% endif %}
| {% block node_details_meta_extra %}{% endblock %} li.download
| {% if (current_user.has_cap('subscriber') or node.permissions.world) and (node.file or node.properties.files) %}
li.download | {% block node_download %}
| {% if (current_user.has_cap('subscriber') or node.permissions.world) and (node.file or node.properties.files) %} a(
| {% block node_download %} title="Download {{ node.properties.content_type | undertitle }}",
a( href="{{ node.file.link }}",
title="Download {{ node.properties.content_type | undertitle }}", download="{{ node.file.filename }}")
href="{{ node.file.link }}", button.btn.btn-sm.btn-outline-primary.px-3(type="button")
download="{{ node.file.filename }}") i.pi-download.pr-2
button.btn.btn-sm.btn-outline-primary.px-3(type="button")
i.pi-download.pr-2
| Download
| {% endblock node_download %}
| {% elif current_user.has_cap('can-renew-subscription') %}
a.btn.btn-outline-primary(
title="Renew your subscription to download",
target="_blank",
href="/renew")
i.pi-heart.pr-2
| Renew Subscription
| {% elif current_user.is_authenticated %}
.btn.disabled
i.pi-lock
| Download | Download
| {% endblock node_download %}
| {% else %} | {% elif current_user.has_cap('can-renew-subscription') %}
a.btn( a.btn.btn-outline-primary(
title="Login to download {{ node.properties.content_type | undertitle }}", title="Renew your subscription to download",
href="{{ url_for('users.login') }}") target="_blank",
i.pi-lock href="/renew")
| Download i.pi-heart.pr-2
| {% endif %} | Renew Subscription
| {% endblock node_details %} | {% elif current_user.is_authenticated %}
.btn.disabled
i.pi-lock
| Download
| {% else %}
a.btn(
title="Login to download {{ node.properties.content_type | undertitle }}",
href="{{ url_for('users.login') }}")
i.pi-lock
| Download
| {% endif %}
| {% endblock node_details %}
.container-fluid .container-fluid
.row .row
| {% block node_comments %} | {% block node_comments %}