mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 17:23:15 +00:00
tweaks to disable view live button
This commit is contained in:
parent
9fe9369524
commit
b820a873fd
4 changed files with 30 additions and 21 deletions
|
|
@ -238,6 +238,8 @@
|
|||
|
||||
<a href="#" class="button no">no / serious</a>
|
||||
|
||||
<a href="#" class="button disabled">disabled</a>
|
||||
|
||||
<a href="#" class="button bicolor icon icon-plus">bicolor with icon</a>
|
||||
|
||||
<a href="#" class="button button-small">button-small</a>
|
||||
|
|
@ -246,6 +248,9 @@
|
|||
|
||||
<a href="#" class="button button-secondary no">mixed 1</a>
|
||||
|
||||
<a href="#" class="button button-secondary disabled">disabled</a>
|
||||
|
||||
|
||||
<a href="#" class="button no bicolor icon icon-cog">mixed 2</a>
|
||||
|
||||
<div class="button no bicolor icon icon-cog">button on a div</div>
|
||||
|
|
|
|||
|
|
@ -323,10 +323,16 @@ input[type=submit], input[type=reset], input[type=button], .button, button{
|
|||
-moz-appearance: none;
|
||||
-moz-box-sizing:border-box;
|
||||
}
|
||||
&:disabled, &[disabled]{
|
||||
background-color:$color-grey-2;
|
||||
border-color:$color-grey-2;
|
||||
color:lighten($color-grey-2, 15%);
|
||||
&:disabled, &[disabled], &.disabled{
|
||||
background-color:$color-grey-3 !important;
|
||||
border-color:$color-grey-3 !important;
|
||||
color:lighten($color-grey-2, 15%) !important;
|
||||
cursor:default;
|
||||
}
|
||||
&.button-secondary:disabled, &.button-secondary[disabled], &.button-secondary.disabled{
|
||||
background-color: white !important;
|
||||
border-color:$color-grey-3 !important;
|
||||
color:$color-grey-3 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -196,15 +196,12 @@ ul.listing{
|
|||
}
|
||||
|
||||
.button{
|
||||
color:$color-teal;
|
||||
border-color:$color-grey-3;
|
||||
background:white;
|
||||
font-size:0.84em; /* 0.01em difference to regular small buttons */
|
||||
|
||||
&:hover{
|
||||
border-color:$color-teal;
|
||||
background-color:$color-teal;
|
||||
color:white;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,22 +75,23 @@
|
|||
|
||||
<ul class="actions">
|
||||
{% if parent_page_perms.can_edit and 'edit' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_edit' parent_page.id %}" class="button button-small">{% trans 'Edit' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_edit' parent_page.id %}" class="button button-small button-secondary">{% trans 'Edit' %}</a></li>
|
||||
{% endif %}
|
||||
{% if parent_page.has_unpublished_changes and 'view_draft' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_view_draft' parent_page.id %}" class="button button-small" target="_blank">{% trans 'Draft' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_view_draft' parent_page.id %}" class="button button-small button-secondary" target="_blank">{% trans 'Draft' %}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if parent_page.live and not parent_page.is_root and 'view_live' not in hide_actions|default:'' %}
|
||||
<li><a href="{{ parent_page.url }}" class="button button-small" target="_blank">{% trans 'Live' %}</a></li>
|
||||
<li><a {% if parent_page.url %}href="{{ parent_page.url }}"{% endif %} class="button button-small button-secondary {% if not parent_page.url %}disabled{% endif %}" target="_blank" {% if not parent_page.url %}title="{% trans 'This page is published but does not exist within a configured Site, so cannot be viewed.' %}"{% endif %}>{% trans 'Live' %}</a></li>
|
||||
{% endif %}
|
||||
{% if parent_page_perms.can_move and 'move' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_move' parent_page.id %}" class="button button-small">{% trans 'Move' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_move' parent_page.id %}" class="button button-small button-secondary">{% trans 'Move' %}</a></li>
|
||||
{% endif %}
|
||||
{% if parent_page_perms.can_delete and 'delete' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_delete' parent_page.id %}" class="button button-small">{% trans 'Delete' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_delete' parent_page.id %}" class="button button-small button-secondary">{% trans 'Delete' %}</a></li>
|
||||
{% endif %}
|
||||
{% if parent_page_perms.can_unpublish and 'unpublish' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_unpublish' parent_page.id %}" class="button button-small">{% trans 'Unpublish' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_unpublish' parent_page.id %}" class="button button-small button-secondary">{% trans 'Unpublish' %}</a></li>
|
||||
{% endif %}
|
||||
{% if parent_page_perms.can_add_subpage and 'add_subpage' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_add_subpage' parent_page.id %}" class="button button-small bicolor icon white icon-plus">{% trans 'Add child page' %}</a></li>
|
||||
|
|
@ -207,28 +208,28 @@
|
|||
{% if not moving and not choosing %}
|
||||
<ul class="actions">
|
||||
{% if page_perms.can_edit and 'edit' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_edit' page.id %}" class="button button-small" title="{% trans 'Edit this page' %}">{% trans 'Edit' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_edit' page.id %}" class="button button-small button-secondary" title="{% trans 'Edit this page' %}">{% trans 'Edit' %}</a></li>
|
||||
{% endif %}
|
||||
{% if page.has_unpublished_changes and 'view_draft' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_view_draft' page.id %}" class="button button-small" target="_blank">{% trans 'Draft' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_view_draft' page.id %}" class="button button-small button-secondary" target="_blank">{% trans 'Draft' %}</a></li>
|
||||
{% endif %}
|
||||
{% if page.live and 'view_live' not in hide_actions|default:'' %}
|
||||
<li><a href="{{ page.url }}" class="button button-small" target="_blank">{% trans 'Live' %}</a></li>
|
||||
<li><a {% if page.url %}href="{{ page.url }}"{% endif %} class="button button-small button-secondary {% if not page.url %}disabled{% endif %}" target="_blank" {% if not page.url %}title="{% trans 'This page is published but does not exist within a configured Site, so cannot be viewed.' %}"{% endif %}>{% trans 'Live' %}</a></li>
|
||||
{% endif %}
|
||||
{% if page_perms.can_move and 'move' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_move' page.id %}" class="button button-small">{% trans 'Move' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_move' page.id %}" class="button button-small button-secondary">{% trans 'Move' %}</a></li>
|
||||
{% endif %}
|
||||
{% if parent_page_perms.can_add_subpage and 'copy' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_copy' page.id %}" class="button button-small">{% trans 'Copy' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_copy' page.id %}" class="button button-small button-secondary">{% trans 'Copy' %}</a></li>
|
||||
{% endif %}
|
||||
{% if page_perms.can_delete and 'delete' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_delete' page.id %}" class="button button-small">{% trans 'Delete' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_delete' page.id %}" class="button button-small button-secondary">{% trans 'Delete' %}</a></li>
|
||||
{% endif %}
|
||||
{% if page_perms.can_unpublish and 'unpublish' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_unpublish' page.id %}" class="button button-small">{% trans 'Unpublish' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_unpublish' page.id %}" class="button button-small button-secondary">{% trans 'Unpublish' %}</a></li>
|
||||
{% endif %}
|
||||
{% if page_perms.can_add_subpage and 'add_subpage' not in hide_actions|default:'' %}
|
||||
<li><a href="{% url 'wagtailadmin_pages_add_subpage' page.id %}" class="button button-small">{% trans 'Add child page' %}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_pages_add_subpage' page.id %}" class="button button-small button-secondary">{% trans 'Add child page' %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue