_menu.html.erb 1.65 KB
Newer Older
Alexandre Friquet's avatar
Alexandre Friquet committed
1
2
3
4
<%
# OLIGAA - Stands for "Outil en Ligne d'Information et de Gestion des Activités
# des Associations" which is an online tool for associations to manage news,
# actors and activities.
5
# Copyright (C) 2010-2019 Comité Départemental du Sport Adapté de la Gironde (CDSA
Alexandre Friquet's avatar
Alexandre Friquet committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 33) <contact@cdsa33.org>
#
# This file is part of OLIGAA.
#
# OLIGAA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# OLIGAA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with OLIGAA.  If not, see <http://www.gnu.org/licenses/>.
%>
<% pages = menu.pages %>
<h2>
25
  <%= toggle_link menu.title, "#menu-#{menu.id}" %>
26
  <%= "(#{pages.length})" if menu.destroyable? %>
Alexandre Friquet's avatar
Alexandre Friquet committed
27
28
29
</h2>
<div id="menu-<%= menu.id %>" style="display:none;">
  <p class="AdminCard-headingActions no_print">
30
    <%= custom_delete_link menu, :short, class: %w(tight) if menu.destroyable? %>
Alexandre Friquet's avatar
Alexandre Friquet committed
31
32
33
34
35
36
37
38
    <%= custom_edit_link edit_menu_path(menu), :short, class: %w(tight) %>
    <%= custom_move_up_link move_up_menu_path(menu), :short, class: %w(tight) unless menu.first? %>
    <%= custom_move_down_link move_down_menu_path(menu), :short, class: %w(tight) unless menu.last? %>
  </p>
  <ol>
    <%= render partial: 'page', collection: pages, locals: { positionnable: true } %>
  </ol>
</div>