Sha256: cb1063ad87f885935afac9bbdee99cebb6c752b74a7f227997de51e9762fe4a9

Contents?: true

Size: 735 Bytes

Versions: 7

Compression:

Stored size: 735 Bytes

Contents

<% if Setting.any? %>

<% 

  @groups = {}
  
  @settings.each {|s|
    @groups[s.group] ||= []
    @groups[s.group] << s
  }
 
  @groups = @groups.to_a
  
  @groups.sort! do |g1, g2|    
    if g1.first.to_s == "global"
      -1
    elsif g2.first.to_s == "global"
      1
    else  
      g1.first.to_s <=> g2.first.to_s
    end
  end

  nil
 %>

<%= tabs do |t| %>

    <% @groups.each do |g,settings| %>
      <%= t.pane t(g, :scope => "fullstack.admin.groups", :default => g.to_s.humanize) do %>
      <% settings.each do |stg| %>
            <p><%= link_to t(stg.key, :scope => "helpers.label", :default => stg.key.to_s.humanize), [:edit, :admin, stg] %></p>
        <% end %>
      <% end %>
    <% end %>

<% end %>

<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fullstack-cms-0.2.5 app/views/admin/settings/_collection.html.erb
fullstack-cms-0.2.4 app/views/admin/settings/_collection.html.erb
fullstack-cms-0.2.3 app/views/admin/settings/_collection.html.erb
fullstack-cms-0.2.2 app/views/admin/settings/_collection.html.erb
fullstack-cms-0.2.1 app/views/admin/settings/_collection.html.erb
fullstack-cms-0.1.17 app/views/admin/settings/_collection.html.erb
fullstack-cms-0.1.15 app/views/admin/settings/_collection.html.erb