Sha256: de85f8c874bc0643638e21da6889a5a63eb6ef62a42f307c7803df823865ff58

Contents?: true

Size: 1.29 KB

Versions: 5

Compression:

Stored size: 1.29 KB

Contents

<div class="details">
  <% if child? %>
      <div class="row">
    <div class="small-8 column">
  <% end %>
  <% fields.each do |f, field_type| %>
      <p>
        <% case field_type
           when "belongs_to" %> <b translate><%= f.capitalize %> :</b> {{object.<%= f %>.name}}
        <% when "has_many" %><p>
        <b translate><%= f.capitalize %> :</b>
        <ul>
          <li ng-repeat="item in object.<%= f %>"> {{ item.name }}</li>
        </ul>
      </p>
      <% else %><b translate><%= f.capitalize %> :</b> {{object.<%= f %>}}
      <% end %></p>
    <% end %>

    <% if child? %>
          </div>

    <div class="small-4 column">
      <ul>
      <% childs.each do |child| %>

        <li>
          <a ng-href="#/<%= resource_data['name'].pluralize %>/{{ object.id }}/<%= child.pluralize %>" class="small">
            <span translated><%= child.split('_').tap{|a| a[0].upcase }.join(' ') %></span>
          </a>
        </li>
      <% end %>
      </ul>
    </div>
  </div>

      <% end %>
  <ul class="button-group float-right">
    <a ng-href="#<% parents.each do |p| %>/<%= p %>/{{ this.$parent.$parent.$parent.$parent.<%= p %>_id }}<% end %>/<%= resource_url %>/{{ object.id }}/edit" class="small">
      <span class="fa fa-edit"></span> <span translated>Edit</span>
    </a>
  </ul>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
faalis-1.0.0 lib/generators/faalis/templates/js/list_view/details.html.erb
faalis-1.0.0.alpha4 lib/generators/faalis/templates/js/list_view/details.html.erb
faalis-1.0.0.alpha3 lib/generators/faalis/templates/js/list_view/details.html.erb
faalis-1.0.0.alpha2 lib/generators/faalis/templates/js/list_view/details.html.erb
faalis-1.0.0.alpha1 lib/generators/faalis/templates/js/list_view/details.html.erb