braine/boussu: add links to all items in dashboard (#61087)
This commit is contained in:
parent
61c595766d
commit
04c0057cff
|
@ -83,6 +83,15 @@ $('.newsitem-category').detach().attr('hidden', null).appendTo($newsitems.find('
|
|||
$('.newsitem-category').order(true);
|
||||
$('.newsitem').order(false, function(el) { return $(el).data('date'); });
|
||||
|
||||
if ("{{ plone_actualites_url|default:'' }}") {
|
||||
if ($newsitems.find('.all').length) {
|
||||
var $all = $newsitems.find('.all').detach();
|
||||
} else {
|
||||
var $all = $('<p class="all"><a class="pk-button" href="{{ plone_actualites_url }}">Toutes les actualités</a></p>');
|
||||
}
|
||||
$all.appendTo($newsitems);
|
||||
}
|
||||
|
||||
function hide_duplicates(base) {
|
||||
var duplicates = Object();
|
||||
$(base).find('div[data-slug]').each(function(idx, elem) {
|
||||
|
|
|
@ -55,4 +55,9 @@
|
|||
{% empty %}
|
||||
<p>Aucune.</p>
|
||||
{% endfor %}
|
||||
|
||||
{% if plone_deliberations_url %}
|
||||
<div class="all"><a class="pk-button" href="{{ plone_deliberations_url }}">Toutes les délibérations</a></p>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -101,6 +101,15 @@ $('.eventitem-category').detach().attr('hidden', null).appendTo($eventitems.find
|
|||
$('.eventitem-category').order(true);
|
||||
$('.eventitem').order(false, function(el) { return $(el).data('date'); });
|
||||
|
||||
if ("{{ plone_evenements_url|default:'' }}") {
|
||||
if ($eventitems.find('.all').length) {
|
||||
var $all = $eventitems.find('.all').detach();
|
||||
} else {
|
||||
var $all = $('<p class="all"><a class="pk-button" href="{{ plone_evenements_url }}">Tous les événements</a></p>');
|
||||
}
|
||||
$all.appendTo($eventitems);
|
||||
}
|
||||
|
||||
function hide_duplicates(base) {
|
||||
var duplicates = Object();
|
||||
$(base).find('div[data-slug]').each(function(idx, elem) {
|
||||
|
|
Loading…
Reference in New Issue