Sha256: 55de64ad085915d14bce58f46788d3b5b97e0423f74c2862709f4c1b279d9d70

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

<h1><%= @controller %></h1>
<table class="table table-striped">
  <thead>
    <tr>
      <%- columns.each do |column| -%>
        <th><%= column.name.humanize %></th>
      <%- end -%>
      <th>Actions</th>
    </tr>
  </thead>
  <%- @columns = columns -%>
  <%- tag_column = @columns.shift -%>
  <tbody>
    <tr ng-repeat="<%= @resource_name%> in <%= @plural_model_name%>">
      <td>
        <a href="/<%= @plural_model_name%>/{{<%= @resource_name%>.id}}">
          {{<%= "#{@resource_name}.#{tag_column.name}"%>}}
        </a>
      </td>
      <%- @columns.each do |column| -%>
        <td>
          {{<%= @resource_name%>.<%= column.name %>}}
        </td>
      <%- end -%>
      <td>
        <a href="/<%= @plural_model_name%>/{{<%= @resource_name%>.id}}/edit"
          class="btn btn-primary"><i class="icon-edit"></i>
          Edit
        </a>
        <button ng-click="destroy()" class="btn btn-danger">
          <i class="icon-trash"></i> Delete
        </button>
      </td>
    </tr>
  </tbody>
</table>

<p>
  <a href='/<%= @plural_model_name%>/new' class="btn btn-primary">
    <i class="icon-plus"></i>New
  </a>
</p>

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
angular_scaffold-0.0.1 lib/generators/angular_scaffold/scaffold/templates/index.html.erb
angularjs_scaffold-0.0.24 lib/generators/angularjs/scaffold/templates/index.html.erb
angularjs_scaffold-0.0.23 lib/generators/angularjs/scaffold/templates/index.html.erb
angularjs_scaffold-0.0.22 lib/generators/angularjs/scaffold/templates/index.html.erb
explainer_angularjs_scaffold-0.0.23 lib/generators/angularjs/scaffold/templates/index.html.erb
explainer_angularjs_scaffold-0.0.22 lib/generators/angularjs/scaffold/templates/index.html.erb
explainer_angularjs_scaffold-0.0.21 lib/generators/angularjs/scaffold/templates/index.html.erb