mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-18 04:01:11 +00:00
styling of edit lock
This commit is contained in:
parent
75b8cc0483
commit
a7f2163f7c
5 changed files with 46 additions and 30 deletions
|
|
@ -121,7 +121,7 @@
|
|||
color:lighten($color-grey-2,30%);
|
||||
-webkit-font-smoothing: auto;
|
||||
font-size:0.80em;
|
||||
margin:0 0.5em;
|
||||
margin:0 0.5em 0.5em 0.5em;
|
||||
background:white url("#{$static-root}bg-dark-diag.svg");
|
||||
|
||||
&.primary{
|
||||
|
|
@ -130,11 +130,17 @@
|
|||
background:white
|
||||
}
|
||||
}
|
||||
form.status-tag:hover,
|
||||
a.status-tag:hover,
|
||||
a.status-tag.primary:hover{
|
||||
border-color:$color-teal;
|
||||
color:$color-teal;
|
||||
}
|
||||
form.status-tag:hover{
|
||||
border-color:$color-teal-dark;
|
||||
background-color:$color-teal-darker;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.privacy-indicator {
|
||||
.label-private, .label-public{
|
||||
|
|
|
|||
|
|
@ -295,6 +295,37 @@ input[type=submit], input[type=reset], input[type=button], .button, button{
|
|||
+ button{
|
||||
margin-left:1em;
|
||||
}
|
||||
|
||||
// A completely unstyled button
|
||||
&.unbutton{
|
||||
@include border-radius(0px);
|
||||
width:auto;
|
||||
height:auto;
|
||||
line-height:auto;
|
||||
padding:0;
|
||||
font-size:inherit;
|
||||
font-weight:normal;
|
||||
vertical-align: middle;
|
||||
display:inline;
|
||||
background-color:transparent;
|
||||
border:0;
|
||||
color:inherit;
|
||||
text-decoration:none;
|
||||
text-transform:uppercase;
|
||||
white-space: nowrap;
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
outline:none;
|
||||
box-sizing:border-box;
|
||||
-webkit-font-smoothing: auto;
|
||||
-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%);
|
||||
}
|
||||
}
|
||||
|
||||
/* Special styles to counteract Firefox's completely unwarranted assumptions about button styles */
|
||||
|
|
|
|||
|
|
@ -6,23 +6,23 @@
|
|||
|
||||
<div class="lock-indicator {% if page.locked %}locked{% else %}unlocked{% endif %}">
|
||||
{% if page.locked %}
|
||||
{% trans "Locked" %}
|
||||
{% trans "Edit lock" %}
|
||||
|
||||
{% if page_perms.can_lock %}
|
||||
<form action="{% url 'wagtailadmin_pages_unlock' page.id %}" method="POST">
|
||||
<form action="{% url 'wagtailadmin_pages_unlock' page.id %}" method="POST" class="status-tag primary">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{% url 'wagtailadmin_pages_edit' page.id %}">
|
||||
<input type="submit" value="{% trans "Unlock" %}">
|
||||
<input type="submit" class="unbutton" value="{% trans "Locked" %}">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% trans "Unlocked" %}
|
||||
{% trans "Edit lock" %}
|
||||
|
||||
{% if page_perms.can_lock %}
|
||||
<form action="{% url 'wagtailadmin_pages_lock' page.id %}" method="POST">
|
||||
<form action="{% url 'wagtailadmin_pages_lock' page.id %}" method="POST" class="status-tag secondary">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{% url 'wagtailadmin_pages_edit' page.id %}">
|
||||
<input type="submit" value="{% trans "Lock" %}">
|
||||
<input type="submit" class="unbutton" value="{% trans "Unlocked" %}">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
{% load i18n %}
|
||||
<div class="wagtail-moderator-controls">
|
||||
<div class="message">
|
||||
<p>{% blocktrans with title=revision.page.title submitted_by=revision.user.get_full_name|default:revision.user.username submitted_on=revision.created_at|date:"d M Y H:i" %}
|
||||
Previewing '{{ title }}', submitted by {{ submitted_by }} on {{ submitted_on }}.
|
||||
{% endblocktrans %}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a href="{% url 'wagtailadmin_pages_edit' revision.page.id %}" class="button">{% trans 'Edit' %}</a>
|
||||
<form action="{% url 'wagtailadmin_pages_approve_moderation' revision.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="button yes" value="{% trans 'Approve' %}" />
|
||||
</form>
|
||||
|
||||
<form action="{% url 'wagtailadmin_pages_reject_moderation' revision.id %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="submit" class="button no" value="{% trans 'Reject' %}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -36,8 +36,9 @@
|
|||
<ul>
|
||||
<li class="actions">
|
||||
<div class="dropdown dropup dropdown-button match-width">
|
||||
<input type="submit" value="{% if page.locked %}{% trans 'Page locked' %}{% else %}{% trans 'Save draft' %}{% endif %}" class="button" {% if page.locked %}disabled {% endif %} />
|
||||
|
||||
{% if not page.locked %}
|
||||
<input type="submit" value="{% trans 'Save draft' %}" class="button" />
|
||||
<div class="dropdown-toggle icon icon-arrow-up"></div>
|
||||
<ul role="menu">
|
||||
{% if page_perms.can_unpublish %}
|
||||
|
|
@ -51,8 +52,6 @@
|
|||
{% endif %}
|
||||
<li><input type="submit" name="action-submit" value="{% trans 'Submit for moderation' %}" class="button" /></li>
|
||||
</ul>
|
||||
{% else %}
|
||||
{% trans "Locked" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Reference in a new issue