Commit 4cb5d6a7 authored by David F.'s avatar David F.
Browse files

Merge branch '100-menus-personnalisables' into 'master'

Allow textilization of menus: refs #100.

See merge request !104
parents 4b7a66f9 214525a1
...@@ -35,7 +35,7 @@ module ApplicationHelper ...@@ -35,7 +35,7 @@ module ApplicationHelper
options[:class] = [options[:class]].flatten << 'current' if current_page?(target) || in_breadcrumbs?(target) options[:class] = [options[:class]].flatten << 'current' if current_page?(target) || in_breadcrumbs?(target)
content_tag :li, options do content_tag :li, options do
link_to title, target link_to textilize_without_paragraph(title), target
end end
end end
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with OLIGAA. If not, see <http://www.gnu.org/licenses/>. # along with OLIGAA. If not, see <http://www.gnu.org/licenses/>.
%> %>
<% title @title %> <% title textilize_without_paragraph(@title) %>
<div class="card-block"> <div class="card-block">
<h1><%= yield :title %></h1> <h1><%= yield :title %></h1>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<%- newsletters = Newsletter.for_nav %> <%- newsletters = Newsletter.for_nav %>
<%- if newsletters.any? %> <%- if newsletters.any? %>
<li class="menu_item"> <li class="menu_item">
<span class="menu_title"><%= menu.title %></span> <span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul> <ul>
<% newsletters.each do |newsletter| %> <% newsletters.each do |newsletter| %>
<%= menu_to newsletter.title, newsletter %> <%= menu_to newsletter.title, newsletter %>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<%- end %> <%- end %>
<% when "activity_categories" %> <% when "activity_categories" %>
<li class="menu_item"> <li class="menu_item">
<span class="menu_title"><%= menu.title %></span> <span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul> <ul>
<% ActivityCategory.all.each do |cat| %> <% ActivityCategory.all.each do |cat| %>
<%= menu_to cat.title, activity_category_path(cat) %> <%= menu_to cat.title, activity_category_path(cat) %>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<% when "member_groups" %> <% when "member_groups" %>
<% unless settings.map_member_groups.empty? %> <% unless settings.map_member_groups.empty? %>
<li class="menu_item"> <li class="menu_item">
<span class="menu_title"><%= menu.title %></span> <span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul> <ul>
<% settings.map_member_groups.each do |group| %> <% settings.map_member_groups.each do |group| %>
<%= menu_to group.title, member_group_path(group) %> <%= menu_to group.title, member_group_path(group) %>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<%= menu_to menu.title, club_novels_path, class: 'menu_item' %> <%= menu_to menu.title, club_novels_path, class: 'menu_item' %>
<% when "member_zone" %> <% when "member_zone" %>
<li class="menu_item"> <li class="menu_item">
<span class="menu_title"><%= menu.title %></span> <span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul> <ul>
<% if logged_in? %> <% if logged_in? %>
<%= menu_to "Ma fiche", current_member %> <%= menu_to "Ma fiche", current_member %>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<% else %> <% else %>
<% if menu.should_be_displayed? %> <% if menu.should_be_displayed? %>
<li class="menu_item"> <li class="menu_item">
<span class="menu_title"><%= menu.title %></span> <span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul> <ul>
<% menu.public_pages.each do |page| %> <% menu.public_pages.each do |page| %>
<%= menu_to page.title, page %> <%= menu_to page.title, page %>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
%> %>
<% pages = menu.pages %> <% pages = menu.pages %>
<h2> <h2>
<%= toggle_link menu.title, "#menu-#{menu.id}" %> <%= toggle_link textilize_without_paragraph(menu.title), "#menu-#{menu.id}" %>
<%= "(#{pages.length})" if menu.destroyable? %> <%= "(#{pages.length})" if menu.destroyable? %>
</h2> </h2>
<div id="menu-<%= menu.id %>" style="display:none;"> <div id="menu-<%= menu.id %>" style="display:none;">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment