<%= print_flash_message %>
<div>
    <%= link_to_new url_for(controller: '/admin/system/settings/groups', action: 'new'), 'object-type' => ::System::Settings::Group do %>
        <button class='btn btn-success'><%= I18n.t("admin.system.settings.groups.buttons.new') %></button>
    <% end %>
</div>

<div class="row-fluid">
    <div class="span12 box gradient ">
        <div class="title">
            <h2>
                <i class=" icon-bar-chart"></i><span><%= I18n.t("admin.system.settings.groups.index.title') %></span>
            </h2>
            <%= form_tag url_for(controller: '/admin/system/settings/groups', action: 'index'), method: 'get', 'ajaxify' => 'true', class: 'margin: 0; padding:0;' do %>
                <div class="dataTables_filter" id="datatable_example_filter">
                    <label>
                        <%= I18n.t("admin.system.settings.groups.index.search") %>: <%= text_field_tag "search", params[:search], 'aria-controls' => "datatable_example" %>
                        <input type="submit" value="<%= I18n.t("admin.system.settings.groups.index.search_button") %>"/>
                    </label>
                </div>
            <% end %>
        </div>
        <!-- End .title -->
        <div class="content top">
            <table id="datatable_example" class="responsive table table-striped table-bordered" style="width:100%;margin-bottom:0; ">
                <thead>
                <!--<th class="no_sort">
                    <input type="checkbox"/>
                </th>-->

                <th class="no_sort">
                    <%= I18n.t("activerecord.attributes.system.settings.group.name') %>
                </th>
                <th class="no_sort">
                    <%= I18n.t("activerecord.attributes.system.settings.group.is_system') %>
                </th>
                <th class="ms no_sort ">
                    <%= I18n.t("common.labels.actions') %>
                </th>
                </thead>
                <tbody>
                <% @groups.each do |item| %>
                    <tr>
                        <!--<td>
                            <input type="checkbox"/>
                        </td>-->
                        <td>
                            <%= print_property(item, :name) %>
                        </td>
                        <td>
                            <%= print_property(item, :is_system) %>
                        </td>
                        <td class="ms">
                            <div class="btn-group1">
                                <div class="btn-group1">
                                    <%= link_to_edit print_property(item, :edit_url), class: "btn btn-small", rel: "tooltip", 'data-placement' => "top", 'data-original-title' => I18n.t("admin.system.settings.groups.index.actions.edit'), 'object-type' => ::System::Settings::Group do %>
                                        <i class="gicon-edit"></i>
                                    <% end %>
                                    <%= link_to_show print_property(item, :show_url), class: "btn btn-small", rel: "tooltip", 'data-placement' => "top", 'data-original-title' => I18n.t("admin.system.settings.groups.index.actions.view'), 'object-type' => ::System::Settings::Group do %>
                                        <i class="gicon-eye-open"></i>
                                    <% end %>
                                    <% if !item.is_system? %>
                                        <a class="btn btn-small">
                                            <i class="gicon-remove icon-white"></i>
                                        </a>
                                    <% else %>
                                        <%= link_to_delete print_property(item, :delete_url), class: "btn btn-inverse btn-small", rel: "tooltip", 'data-placement' => "top", 'data-original-title' => I18n.t("admin.system.settings.groups.index.actions.delete'), 'object-type' => ::System::Settings::Group do %>
                                            <i class="gicon-remove icon-white"></i>
                                        <% end %>
                                    <% end %>
                                </div>

                            </div>
                        </td>
                    </tr>
                <% end %>
                </tbody>
            </table>
            <div class="row-fluid control-group">
                <div class="span12">
                    <%= will_paginate @groups, renderer: ChuPaginateLinkRenderer %>
                </div>
            </div>
        </div>
        <!-- End row-fluid -->
    </div>
    <!-- End .content -->
</div>
<!-- End box -->