Sha256: 982a5e0de72e1f94dbb4c8038d155f15b56843b387528b67b8cbfcbaa442ef9a

Contents?: true

Size: 1.7 KB

Versions: 7

Compression:

Stored size: 1.7 KB

Contents

<div class="header">
  <div class="popup_close"><%= link_to t(:close), '#', :terbium_popup_close => true %></div>
  <ul class="navigation">
    <li class="selected">
      <%= link_to t(:choosing), '#', :ajax => resource_path(record, "associated_#{field}_choosing") %>
    </li>
    <li class="notab">
      <% form_tag '#', :class => 'associated_search', :ajax => current_path do %>
        <%= text_field_tag :query, resource_session[:query] %>
        <%= submit_tag 'Search' %>
        <% if resource_session[:query].present? %>
          <%= link_to 'clear', '#', :ajax => current_path(:query => '') %>
        <% end %>
      <% end %>
    </li>
  </ul>
</div>

<div class="pagination">
  <%= will_paginate associated, :renderer => AssociatedLinkRenderer %>
</div>

<div class="popup_content">
  <table class="list_table">
    <thead>
      <tr>
      <% field.association_fields.each do |f| -%>
        <th><%= f.label %></th>
      <% end -%>
        <th class="actions">Actions</th>
      </tr>
    </thead>
    <tbody>
    <% associated.each do |association| -%>
      <tr id="<%= dom_id association %>">
      <% field.association_fields.each do |f| -%>
        <td><%= render_field association, f %></td>
      <% end -%>
        <td class="actions">
          <%= link_to t(:show), resource_path(association), :target => '_blank' if (resource_path(association) rescue nil) %>
          <%= link_to_function t(:choose), "$('associated_#{field}').replace(\"#{escape_javascript render(:partial => "terbium/association/one", :object => association, :locals => {:field => field})}\"); Event.addBehavior.reload(); this.up('.terbium_popup', 0).popup.hide()" %>
        </td>
      </tr>
    <% end -%>
    </tbody>
  </table>
</div>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
puffer-0.0.8 app/views/puffer/associated/_one.html.erb
puffer-0.0.7 app/views/puffer/associated/_one.html.erb
puffer-0.0.6 app/views/puffer/associated/_one.html.erb
puffer-0.0.5 app/views/puffer/associated/_one.html.erb
puffer-0.0.4 app/views/puffer/associated/_one.html.erb
puffer-0.0.3 app/views/puffer/associated/_one.html.erb
puffer-0.0.2 app/views/puffer/associated/_one.html.erb