registered-sites/app/views/admin/customization_logs/get_log.html.erb

46 lines
1.7 KiB
Plaintext
Raw Normal View History

<% @logs.each_with_index do |log, i| %>
<div class="row">
<div class="span9">
<div class="row">
<div class="span2 muted">Author :</div>
<% user = User.find(log.create_user_id) %>
<div class="span7"><%= user.member_profile.nil? ? user.user_name : user.member_profile.name %></div>
</div>
<div class="row">
<div class="span2 muted">Date :</div>
<div class="span7"><%= log.created_at %></div>
</div>
<% if !log.update_user_id.nil? %>
<div class="row">
<div class="span2 muted">Updated by :</div>
<% user = User.find(log.update_user_id) %>
<div class="span7"><%= user.member_profile.nil? ? user.user_name : user.member_profile.name %></div>
</div>
<% end %>
<div class="row">
<div class="span2 muted">Title :</div>
<div class="span7"><%= log.title %></div>
</div>
<% if !log.site_log_files.blank? %>
<div class="row">
<% log.site_log_files.each_with_index do |file,index| %>
<div class="span2 muted"><%= index == 0 ? "Files" : "" %></div>
<div class="span7">
<%= link_to (file.title.nil? || file.title == "" ? file.file_identifier : file.title), file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => file.file_identifier} %>
</div>
<% end %>
</div>
<% end %>
<div class="row">
<div class="span2 muted">Content :</div>
<div class="span7"><%= log.content.html_safe %></div>
</div>
</div>
</div>
<div class="row">
<div class="span9" style="text-align:center;font-size:15px;"><a href="<%= edit_admin_customization_log_path(log) %>">Edit</a></div>
</div>
<% if i != (@logs.length - 1) %>
<hr />
<% end %>
<% end %>