Compare commits
4 Commits
feature/se
...
feature/da
Author | SHA1 | Date | |
---|---|---|---|
985c9cbb95 | |||
ad79fa3b2f | |||
389dc243e1 | |||
47bfa384f3 |
@ -1,132 +1,199 @@
|
||||
.nice-padding {
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
$color-gray: #D0D2D3;
|
||||
$color-light-gray: #EBEBEB;
|
||||
$color-lightest-gray: #F6F6F6;
|
||||
$color-dark-gray: #727272;
|
||||
$block-spacing: 20px;
|
||||
|
||||
.block_container {
|
||||
display: block;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.block_container .block {
|
||||
display: block;
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
width: calc(50% - 10px);
|
||||
min-height: 216px;
|
||||
padding: 10px 20px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 3px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.00), 0 1px 2px rgba(0,0,0,0.00);
|
||||
transition: box-shadow 0.3s cubic-bezier(.25,.8,.25,1), border 0.3s cubic-bezier(.25,.8,.25,1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.block_container .block--disabled h2,
|
||||
.block_container .block--disabled .inspect_container {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.block_container .block h2 {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.block_container .block:nth-child(odd) {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.block_container .block .block_actions {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.block_container .block .block_actions li {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.block_container .block .block_actions li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.block_container .block.suggestion {
|
||||
border: 1px dashed #d9d9d9;
|
||||
}
|
||||
|
||||
.block_container .block:hover {
|
||||
border: 1px solid #fff;
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
|
||||
@media (max-width: 699px) {
|
||||
.block_container .block {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.block_container .block .inspect_container {
|
||||
.block-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.block_container .block .inspect_container .inspect {
|
||||
display: block;
|
||||
float: left;
|
||||
width: calc(50% - 10px);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.block_container .block span.icon::before {
|
||||
margin-right: 0.3em;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.block_container .block .inspect_container .inspect li {
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.block_container .block .inspect_container .inspect li span {
|
||||
.block {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 5px 0;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.block_container .block .inspect_container .inspect li pre {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: auto;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
margin: 5px 0 5px 21px;
|
||||
padding: 2px 5px;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
overflow-x: hidden;
|
||||
width: 22%;
|
||||
max-width: 320px;
|
||||
min-width: 280px;
|
||||
min-height: 260px;
|
||||
margin: 1.5%;
|
||||
border: 1px solid $color-gray;
|
||||
border-radius: 3px;
|
||||
padding-bottom: 62px;
|
||||
|
||||
&__segment {
|
||||
position: relative;
|
||||
|
||||
.block-header,
|
||||
.block-rules,
|
||||
.block-footer {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.block-header {
|
||||
padding: $block-spacing;
|
||||
border-bottom: 1px solid $color-gray;
|
||||
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.block-rules {
|
||||
padding: $block-spacing 0;
|
||||
}
|
||||
|
||||
.block-footer {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
padding: $block-spacing / 2 $block-spacing;
|
||||
border-top: 1px solid $color-gray;
|
||||
background-color: $color-lightest-gray;
|
||||
}
|
||||
|
||||
.block-data {
|
||||
margin-bottom: $block-spacing;
|
||||
margin-right: $block-spacing / 2;
|
||||
|
||||
&__description {
|
||||
margin-bottom: 3px;
|
||||
font-size: 14px;
|
||||
color: $color-dark-gray;
|
||||
}
|
||||
|
||||
&__content {
|
||||
margin-bottom: 0;
|
||||
font-size: 18px;
|
||||
|
||||
&--code {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
padding-left: 3px !important;
|
||||
padding-right: 3px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
margin-left: $block-spacing + 10px;
|
||||
margin-top: 0;
|
||||
border: 1px solid $color-gray;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
background-color: $color-lightest-gray;
|
||||
}
|
||||
}
|
||||
|
||||
&--icon {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
transform: translate(-20%, -50%);
|
||||
margin-right: 0;
|
||||
font-size: 32px;
|
||||
color: $color-light-gray;
|
||||
}
|
||||
|
||||
.block-data__description,
|
||||
.block-data__content {
|
||||
padding-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.block-stats {
|
||||
&__content {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.block-actions {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
|
||||
&__action {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&-suggestion {
|
||||
position: relative;
|
||||
border: 1px dashed $color-gray;
|
||||
|
||||
&__text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: $color-gray;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.block-suggestion {
|
||||
&__text {
|
||||
color: $color-dark-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.block_container .block.suggestion .suggestive_text {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: calc(100% - 40px);
|
||||
text-align: center;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #d9d9d9;
|
||||
font-size: 20px;
|
||||
font-weight: 100;
|
||||
.segment {
|
||||
&--match-all,
|
||||
&--match-any {
|
||||
.block-data--icon {
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
padding-left: 5px;
|
||||
border-left: 1px solid $color-light-gray;
|
||||
color: $color-light-gray;
|
||||
text-align: left;
|
||||
font-family: "FontAwesome";
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&:last-child:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--match-all {
|
||||
.block-data--icon {
|
||||
&:after {
|
||||
content: "\f0c1";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--match-any {
|
||||
.block-data--icon {
|
||||
&:after {
|
||||
content: "\f127";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
.nice-padding{padding-left:50px;padding-right:50px}.block_container{display:block;margin-top:30px}.block_container .block{display:block;float:left;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:calc(50% - 10px);min-height:216px;padding:10px 20px;margin-bottom:20px;border:1px solid #d9d9d9;border-radius:3px;background-color:#fff;-webkit-box-shadow:0 1px 3px transparent,0 1px 2px transparent;box-shadow:0 1px 3px transparent,0 1px 2px transparent;-webkit-transition:border .3s cubic-bezier(.25,.8,.25,1),-webkit-box-shadow .3s cubic-bezier(.25,.8,.25,1);transition:border .3s cubic-bezier(.25,.8,.25,1),-webkit-box-shadow .3s cubic-bezier(.25,.8,.25,1);transition:box-shadow .3s cubic-bezier(.25,.8,.25,1),border .3s cubic-bezier(.25,.8,.25,1);transition:box-shadow .3s cubic-bezier(.25,.8,.25,1),border .3s cubic-bezier(.25,.8,.25,1),-webkit-box-shadow .3s cubic-bezier(.25,.8,.25,1);cursor:pointer}.block_container .block--disabled .inspect_container,.block_container .block--disabled h2{opacity:.5}.block_container .block h2{display:inline-block;width:auto}.block_container .block:nth-child(odd){margin-right:20px}.block_container .block .block_actions{list-style:none;margin:0;padding:0}.block_container .block .block_actions li{float:left;margin-right:10px}.block_container .block .block_actions li:last-child{margin-right:0}.block_container .block.suggestion{border:1px dashed #d9d9d9}.block_container .block:hover{border:1px solid #fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}@media (max-width:699px){.block_container .block{width:100%;margin-right:0}}.block_container .block .inspect_container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;margin-bottom:10px}.block_container .block .inspect_container .inspect{display:block;float:left;width:calc(50% - 10px);padding:0;margin:0;list-style:none}.block_container .block span.icon:before{margin-right:.3em;vertical-align:bottom}.block_container .block .inspect_container .inspect li{display:inline-block;margin-bottom:5px}.block_container .block .inspect_container .inspect li span{display:block;font-size:20px;font-weight:700;margin:5px 0;overflow-wrap:break-word}.block_container .block .inspect_container .inspect li pre{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;width:auto;background-color:#eee;border:1px solid #ccc;margin:5px 0 5px 21px;padding:2px 5px;word-wrap:break-word;word-break:break-all;border-radius:3px}.block_container .block.suggestion .suggestive_text{display:block;position:absolute;width:calc(100% - 40px);text-align:center;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#d9d9d9;font-size:20px;font-weight:100}
|
||||
.block-container{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.block-container .block{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;overflow-x:hidden;width:22%;max-width:320px;min-width:280px;min-height:260px;margin:1.5%;border:1px solid #d0d2d3;border-radius:3px;padding-bottom:62px}.block-container .block__segment{position:relative}.block-container .block__segment .block-footer,.block-container .block__segment .block-header,.block-container .block__segment .block-rules{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.block-container .block__segment .block-header{padding:20px;border-bottom:1px solid #d0d2d3}.block-container .block__segment .block-header h2{margin-top:0}.block-container .block__segment .block-rules{padding:20px 0}.block-container .block__segment .block-footer{position:absolute;width:100%;bottom:0;padding:10px 20px;border-top:1px solid #d0d2d3;background-color:#f6f6f6}.block-container .block__segment .block-data{margin-bottom:20px;margin-right:10px}.block-container .block__segment .block-data__description{margin-bottom:3px;font-size:14px;color:#727272}.block-container .block__segment .block-data__content{margin-bottom:0;font-size:18px}.block-container .block__segment .block-data__content--code{display:inline-block;width:auto;padding-left:3px!important;padding-right:3px;padding-top:1px;padding-bottom:1px;margin-left:30px;margin-top:0;border:1px solid #d0d2d3;border-radius:3px;font-size:14px;background-color:#f6f6f6}.block-container .block__segment .block-data--icon{position:relative}.block-container .block__segment .block-data--icon:before{display:block;position:absolute;top:50%;left:0;-webkit-transform:translate(-20%,-50%);transform:translate(-20%,-50%);margin-right:0;font-size:32px;color:#ebebeb}.block-container .block__segment .block-data--icon .block-data__content,.block-container .block__segment .block-data--icon .block-data__description{padding-left:30px}.block-container .block__segment .block-data:last-child{margin-bottom:0}.block-container .block__segment .block-stats__content{margin-bottom:3px}.block-container .block__segment .block-actions{margin:0;padding:0;list-style:none}.block-container .block__segment .block-actions__action{display:inline-block;margin-right:5px}.block-container .block__segment .block-actions__action:last-child{margin-right:0}.block-container .block-suggestion{position:relative;border:1px dashed #d0d2d3}.block-container .block-suggestion__text{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:100%;text-align:center;font-size:16px;color:#d0d2d3}.block-container .block-suggestion:hover .block-suggestion__text{color:#727272}.block-container .segment--match-all .block-data--icon,.block-container .segment--match-any .block-data--icon{position:relative}.block-container .segment--match-all .block-data--icon:after,.block-container .segment--match-any .block-data--icon:after{position:absolute;left:5px;padding-left:5px;border-left:1px solid #ebebeb;color:#ebebeb;text-align:left;font-family:FontAwesome;font-size:16px;font-weight:500}.block-container .segment--match-all .block-data--icon:last-child:after,.block-container .segment--match-any .block-data--icon:last-child:after{display:none}.block-container .segment--match-all .block-data--icon:after{content:"\F0C1"}.block-container .segment--match-any .block-data--icon:after{content:"\F127"}
|
||||
/*# sourceMappingURL=dashboard.css.map*/
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3,111 +3,93 @@
|
||||
|
||||
{% block toggle_view %}to List {% endblock%}
|
||||
|
||||
{% block content_main %}
|
||||
<div>
|
||||
<div class="row">
|
||||
{% block content_cols %}
|
||||
{% block result_list %}
|
||||
<div class="block-container">
|
||||
{% if all_count %}
|
||||
{% for segment in object_list %}
|
||||
<div class="block block__segment block__segment--{{ segment.status }} segment--match-{{ segment.match_any|yesno:"any,all" }} segment--{{ segment.persistent|yesno:"persistent,fleeting" }}">
|
||||
|
||||
{% block filters %}
|
||||
{% if view.has_filters and all_count %}
|
||||
<div class="changelist-filter col3">
|
||||
<h2>{% trans 'Filter' %}</h2>
|
||||
{% for spec in view.filter_specs %}{% admin_list_filter view spec %}{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<div>
|
||||
{% block result_list %}
|
||||
<div class="nice-padding block_container">
|
||||
{% if all_count %}
|
||||
{% for segment in object_list %}
|
||||
<div class="block block--{{ segment.status }}" onclick="location.href = 'edit/{{ segment.pk }}'">
|
||||
<h2>{{ segment }}</h2>
|
||||
<div class="inspect_container">
|
||||
<ul class="inspect segment_stats">
|
||||
<li class="visit_stat">
|
||||
{% trans "This segment has been visited" %}
|
||||
<span class="icon icon-fa-rocket">{{ segment.visit_count|localize }} {% trans "time" %}{{ segment.visit_count|pluralize }}</span>
|
||||
</li>
|
||||
<li class="days_stat">
|
||||
{% trans "This segment has been active for" %}
|
||||
<span class="icon icon-fa-calendar">{{ segment.enable_date|days_since:segment.disable_date }} {% trans "day" %}{{ segment.enable_date|days_since:segment.disable_date|pluralize }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
|
||||
<ul class="inspect segment_rules">
|
||||
<li class="match_state {{ segment.match_any|yesno:"any,all" }}">
|
||||
{% trans "The visitor must match" %}
|
||||
{% if segment.match_any %}
|
||||
<span class="icon icon-fa-cube">{% trans "Any rule" %}</span>
|
||||
{% else %}
|
||||
<span class="icon icon-fa-cubes">{% trans "All rules" %}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
<li class="persistent_state {{ segment.persistent|yesno:"persistent,fleeting" }}">
|
||||
{% trans "The persistence of this segment is" %}
|
||||
{% if segment.persistent %}
|
||||
<span class="icon icon-fa-bookmark" title="{% trans "This segment persists in between visits" %}">{% trans "Persistent" %}</span>
|
||||
{% else %}
|
||||
<span class="icon icon-fa-bookmark-o" title="{% trans "This segment is reevaluated on every visit" %}">{% trans "Fleeting" %}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
{% for rule in segment.get_rules %}
|
||||
<li class="{{ rule.encoded_name }}">
|
||||
{{ rule.description.title }}
|
||||
{% if rule.description.code %}
|
||||
<pre>{{ rule.description.value }}</pre>
|
||||
{% else %}
|
||||
<span class="icon icon-{{ rule.icon }}">{{ rule.description.value }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if user_can_create %}
|
||||
<ul class="block_actions">
|
||||
{% if segment.status == segment.STATUS_DISABLED %}
|
||||
<li><a href="{% url 'segment:toggle' segment.pk %}" title="{% trans "Enable this segment" %}">enable</a></li>
|
||||
{% elif segment.status == segment.STATUS_ENABLED %}
|
||||
<li><a href="{% url 'segment:toggle' segment.pk %}" title="{% trans "Disable this segment" %}">disable</a></li>
|
||||
{% endif %}
|
||||
<li><a href="edit/{{ segment.pk }}" title="{% trans "Configure this segment" %}">configure this</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if user_can_create %}
|
||||
{% blocktrans with url=view.create_url name=view.verbose_name %}
|
||||
<a class="block suggestion" href="{{ url }}">
|
||||
<span class="suggestive_text">Add a new {{name}}</span>
|
||||
</a>
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
<div class="block-header">
|
||||
<h2>{{ segment.name }}</h2>
|
||||
<div class="block-data">
|
||||
<p class="block-data__description">{% trans "This segment has been visited" %}</p>
|
||||
<p class="block-data__content">
|
||||
<strong>{{ segment.visit_count|localize }}</strong>
|
||||
{% trans "time" %}{{ segment.visit_count|pluralize }} {% trans "in" %}
|
||||
<strong>{{ segment.enable_date|days_since:segment.disable_date }}</strong>
|
||||
{% trans "day" %}{{ segment.enable_date|days_since:segment.disable_date|pluralize }}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block pagination %}
|
||||
{% if paginator.num_pages > 1 %}
|
||||
<div class="pagination {% if view.has_filters and all_count %}col9{% else %}col12{% endif %}">
|
||||
<p>{% blocktrans with page_obj.number as current_page and paginator.num_pages as num_pages %}Page {{ current_page }} of {{ num_pages }}.{% endblocktrans %}</p>
|
||||
<ul>
|
||||
{% pagination_link_previous page_obj view %}
|
||||
{% pagination_link_next page_obj view %}
|
||||
<div class="block-rules">
|
||||
{% for rule in segment.get_rules %}
|
||||
<div class="block-data block-data--icon icon icon-{{ rule.icon }}">
|
||||
<p class="block-data__description">{{ rule.description.title }}</p>
|
||||
{% if rule.description.code %}
|
||||
<pre class="block-data__content block-data__content--code">{{ rule.description.value }}</pre>
|
||||
{% else %}
|
||||
<p class="block-data__content block-data__content--text">
|
||||
<strong>{{ rule.description.value }}</strong>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="block-footer">
|
||||
<div class="block-stats">
|
||||
<p class="block-stats__content">
|
||||
{% trans "Active on" %}
|
||||
<strong>{{ segment.get_used_pages|length }}</strong>
|
||||
{% trans "page" %}{{ segment.get_used_pages|length|pluralize }} {% trans "and" %}
|
||||
<strong>{{ segment.get_created_variants|length }}</strong>
|
||||
{% trans "variant" %}{{ segment.get_created_variants|length|pluralize }}.
|
||||
</p>
|
||||
</div>
|
||||
<ul class="block-actions">
|
||||
{% if segment.status == segment.STATUS_DISABLED %}
|
||||
<li class="block-actions__action">
|
||||
{% if user_can_create %}
|
||||
<a href="{% url 'segment:toggle' segment.pk %}" title="{% trans "Enable this segment" %}">enable</a>
|
||||
{% else %}
|
||||
<span>enabled</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% elif segment.status == segment.STATUS_ENABLED %}
|
||||
<li class="block-actions__action">
|
||||
{% if user_can_create %}
|
||||
<a href="{% url 'segment:toggle' segment.pk %}" title="{% trans "Disable this segment" %}">disable</a>
|
||||
{% else %}
|
||||
<span>disabled</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user_can_create %}
|
||||
<li class="block-actions__action">
|
||||
<a href="{% url 'wagtail_personalisation_segment_modeladmin_edit' segment.pk %}" title="{% trans "Edit this segment" %}">edit</a>
|
||||
</li>
|
||||
<li class="block-actions__action">
|
||||
<a href="{% url 'wagtail_personalisation_segment_modeladmin_delete' segment.pk %}" title="{% trans "Delete this segment" %}">delete</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="block-actions__action">
|
||||
<a href="{% url 'wagtail_personalisation_segment_modeladmin_inspect' segment.pk %}" title="{% trans "Inspect this segment" %}">inspect</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if user_can_create %}
|
||||
{% blocktrans with url=view.create_url name=view.verbose_name %}
|
||||
<a class="block block-suggestion" href="{{ url }}">
|
||||
<span class="block-suggestion__text">Add a new {{ name }}</span>
|
||||
</a>
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -46,6 +46,7 @@ class SegmentModelAdmin(ModelAdmin):
|
||||
index_view_extra_css = ['css/index.css']
|
||||
form_view_extra_js = ['js/commons.js', 'js/form.js']
|
||||
form_view_extra_css = ['css/form.css']
|
||||
inspect_view_enabled = True
|
||||
|
||||
def index_view(self, request):
|
||||
kwargs = {'model_admin': self}
|
||||
|
Reference in New Issue
Block a user