Sha256: f0b7a97d3288d7edca2cb7560dc23d71b385433557184ba124e637f5873c608d

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

- process_services
- Mindapp::Module.all.asc(:seq).each do |m|
  - unless m.role.blank?
    - next unless login?
    - next unless current_user.role
    - next unless current_user.role.upcase.split(',').include?(m.role.upcase)
  %li
    = m.name
    %ul
      - m.services.asc(:seq).each do |s|
        - next unless s.list
        - xml= REXML::Document.new(s.xml).root
        - unless s.rule.blank?
          - next if (!eval(s.rule))
        - unless s.role.blank?
          - next unless login?
          - next unless current_user.role
          - next unless current_user.role.upcase.split(',').include?(s.role.upcase)
        - if s.code.downcase=="link"
          - name, url = s.name.split(":", 2)
          - url.strip!
        - else
          - name= s.name
          - url= "/mindapp/init/#{s.module_code}/#{s.code}"
        - if s.confirm
          %li
            %a{"data-panel"=>"main", :onclick=>"if (confirm('กรุณายืนยัน')) {location.hash='#{url}'};"}= name
        - else
          %li
            %a{"data-panel"=>"main", :href=> url}= name

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mindapp-0.0.1 lib/generators/mindapp/templates/app/views/mindapp/_menu_mm.haml