afimb/chouette2

View on GitHub
app/views/organisations/show.html.erb

Summary

Maintainability
Test Coverage
<%= title_tag @organisation.name %>

<div class="summary">
  <p>
<label><%= Organisation.human_attribute_name("data_format_restrictions_by_default") %>: </label>
<%= @organisation.data_format %>
  </p>
</div>

<div class="panel-group" id="accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#users">
          <%= t('.users') %>
        </a>
      </h4>
    </div>
    <div id="users" class="panel-collapse collapse">
      <div class="panel-body">
        <div class="users paginated_content">
          <%= paginated_content(@organisation.users, "users/user") %>
        </div>
      </div>
    </div>
  </div>
</div>


<div class="panel-group" id="accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#rule_parameter_sets">
          <%= t('.rule_parameter_sets') %>
        </a>
      </h4>
    </div>
    <div id="rule_parameter_sets" class="panel-collapse collapse">
      <div class="panel-body">
        <div class="rule_parameter_sets paginated_content">
          <%= paginated_content(@organisation.rule_parameter_sets, "rule_parameter_sets/rule_parameter_set") %>
        </div>
      </div>
    </div>
  </div>
</div>

<% content_for :sidebar do %>
<ul class="actions">
  <li><%= link_to t('organisations.actions.edit'), edit_organisation_path, :class => "edit" %></li>
  <li><%= link_to t('users.actions.new'), new_organisation_user_path, :class => "add" %></li>
  <li><%= link_to t('rule_parameter_sets.actions.new'), new_organisation_rule_parameter_set_path, :class => "add" %></li>
</ul>
<% end %>