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
options[:class] = [options[:class]].flatten << 'current' if current_page?(target) || in_breadcrumbs?(target)
content_tag :li, options do
link_to title, target
link_to textilize_without_paragraph(title), target
end
end
......
......@@ -20,7 +20,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with OLIGAA. If not, see <http://www.gnu.org/licenses/>.
%>
<% title @title %>
<% title textilize_without_paragraph(@title) %>
<div class="card-block">
<h1><%= yield :title %></h1>
......
......@@ -32,7 +32,7 @@
<%- newsletters = Newsletter.for_nav %>
<%- if newsletters.any? %>
<li class="menu_item">
<span class="menu_title"><%= menu.title %></span>
<span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul>
<% newsletters.each do |newsletter| %>
<%= menu_to newsletter.title, newsletter %>
......@@ -43,7 +43,7 @@
<%- end %>
<% when "activity_categories" %>
<li class="menu_item">
<span class="menu_title"><%= menu.title %></span>
<span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul>
<% ActivityCategory.all.each do |cat| %>
<%= menu_to cat.title, activity_category_path(cat) %>
......@@ -53,7 +53,7 @@
<% when "member_groups" %>
<% unless settings.map_member_groups.empty? %>
<li class="menu_item">
<span class="menu_title"><%= menu.title %></span>
<span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul>
<% settings.map_member_groups.each do |group| %>
<%= menu_to group.title, member_group_path(group) %>
......@@ -65,7 +65,7 @@
<%= menu_to menu.title, club_novels_path, class: 'menu_item' %>
<% when "member_zone" %>
<li class="menu_item">
<span class="menu_title"><%= menu.title %></span>
<span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul>
<% if logged_in? %>
<%= menu_to "Ma fiche", current_member %>
......@@ -78,7 +78,7 @@
<% else %>
<% if menu.should_be_displayed? %>
<li class="menu_item">
<span class="menu_title"><%= menu.title %></span>
<span class="menu_title"><%= textilize_without_paragraph(menu.title) %></span>
<ul>
<% menu.public_pages.each do |page| %>
<%= menu_to page.title, page %>
......
......@@ -22,7 +22,7 @@
%>
<% pages = menu.pages %>
<h2>
<%= toggle_link menu.title, "#menu-#{menu.id}" %>
<%= toggle_link textilize_without_paragraph(menu.title), "#menu-#{menu.id}" %>
<%= "(#{pages.length})" if menu.destroyable? %>
</h2>
<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