module Www::ResponsibilitiesHelper

  def draw_customized_side_menu
    html = ""
    unless @side_menu.blank?
      html << %(<div id="side-menu">)
        html << %(<div class="timeline-action">)
          @side_menu.each_with_index do |item_menu, i|
            if item_menu.active == true
              html << %(<div class="action-comment">)
                if item_menu.id == @page.id || (item_menu.content.blank? && item_menu.link.nil?) || item_menu.id == 18
                  html << %(<span class="timeline-title timeline-item-disable #{@side_menu.count == i +1 ? '' : 'timeline-divider'}">#{item_menu.name}</span>)
                else
                  html << link_to(item_menu.name, "#{item_menu.link.nil? ? www_page_path(item_menu) : item_menu.link}", class: "timeline-title link-title #{@side_menu.count == i +1 ? '' : 'timeline-divider'}")
                end
                html << %(<div class="clearfix"></div>)
              html << %(</div>)
            end
          end
        html << %(</div>)
      html << %(</div>)
    end
    raw(html)
  end



end