/
_existing_resource.html.erb
29 lines (27 loc) · 1.23 KB
/
_existing_resource.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<div id='existing_resource_area' class='dialog_area' <%= "style='display:none;'" if @resource.errors.any? %>>
<input type='hidden' name='linked_resource' id='linked_resource' />
<div id='existing_resource_area_content' class='clearfix'>
<div id='pages_list' class='pages_list'>
<ul class='link_list'>
<% @resources.each do |resource| -%>
<% resource_linked = (resource.url == params[:current_link]) if params[:current_link].present? %>
<li<%= " class='linked'" if resource_linked %>>
<%= link_to "#{resource.title} (#{resource.file_name})", asset_paths.compute_public_path(resource.url, ''),
:title => t('.link_to_file'),
:rel => resource.title,
:class => 'page_link',
:id => "resource_#{resource.id}" %>
</li>
<% end %>
</ul>
</div>
</div>
<%= will_paginate @resources %>
<%= render :partial => "/refinery/admin/form_actions",
:locals => {
:f => nil,
:submit_button_text => t('.button_text'),
:hide_cancel => true,
:hide_delete => true
} if @app_dialog or @resources.any? %>
</div>