Sha256: c94afa599ba1007810fd48d3bf65a5240ca26fce7e6a0c92b1355567ab8837bb

Contents?: true

Size: 1.95 KB

Versions: 8

Compression:

Stored size: 1.95 KB

Contents

<%- model_class = Repository -%>
<div class="page-header">
  <h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
</div>
<table class="table table-striped">
  <thead>
    <tr>
      <th><%= model_class.human_attribute_name(:name) %></th>
      <th><%= model_class.human_attribute_name(:path) %></th>
      <th><%= model_class.human_attribute_name(:user_id) %></th>
      <th><%= model_class.human_attribute_name(:public) %></th>
      <th><%= model_class.human_attribute_name(:created_at) %></th>
      <th><%=t '.actions', :default => t("helpers.actions") %></th>
    </tr>
  </thead>
  <tbody>
    <% @repositories.each do |repository| %>
      <tr>
        <td>
          <% if can? :read, repository %>
            <%= link_to repository.name, repository_path(repository) %>
          <% else %>
            <%= repository.name %>
          <% end %>
        </td>
        <td><%= repository.path %></td>
        <td><%= repository.user.try :username %></td>
        <td><%= repository.public %></td>
        <td><%=l repository.created_at %></td>
        <td>
          <% if can? :update, repository %>
            <%= link_to t('.edit', :default => t("helpers.links.edit")),
                        edit_repository_path(repository), :class => 'btn btn-mini' %>
          <% end %>
          <% if can? :destroy, repository %>
            <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
                        repository_path(repository),
                        :method => :delete,
                        :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
                        :class => 'btn btn-mini btn-danger' %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<% if can? :create, Repository %>
  <%= link_to t('.new', :default => t("helpers.links.new")),
              new_repository_path,
              :class => 'btn btn-primary' %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
git_wit-0.0.6 test/dummy/app/views/repositories/index.html.erb
git_wit-0.0.6.pre test/dummy/app/views/repositories/index.html.erb
git_wit-0.0.5 test/dummy/app/views/repositories/index.html.erb
git_wit-0.0.4.pre2 test/dummy/app/views/repositories/index.html.erb
git_wit-0.0.4.pre test/dummy/app/views/repositories/index.html.erb
git_wit-0.0.3 test/dummy/app/views/repositories/index.html.erb
git_wit-0.0.2 test/dummy/app/views/repositories/index.html.erb
git_wit-0.0.1 test/dummy/app/views/repositories/index.html.erb