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

47 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

<% @logs.each_with_index do |log, i| %>
2014-12-05 10:08:10 +00:00
<div class="custom-log-item" id="log_<%= log.id.to_s %>">
<div class="custom-log-row">
<div class="custom-log-row-column-label muted">Author :</div>
<% user = User.find(log.create_user_id) %>
<div class="custom-log-row-column"><%= user.member_profile.nil? ? user.user_name : user.member_profile.name %></div>
</div>
<div class="custom-log-row">
<div class="custom-log-row-column-label muted">Date :</div>
<div class="custom-log-row-column"><%= log.created_at %></div>
</div>
<% if !log.update_user_id.nil? %>
<div class="custom-log-row">
<div class="custom-log-row-column-label muted">Updated by :</div>
<% user = User.find(log.update_user_id) %>
<div class="custom-log-row-column"><%= user.member_profile.nil? ? user.user_name : user.member_profile.name %></div>
</div>
<% end %>
<div class="custom-log-row">
<div class="custom-log-row-column-label muted">Title :</div>
<div class="custom-log-row-column"><%= log.title %></div>
</div>
<% if !log.site_log_files.blank? %>
<div class="custom-log-row">
<div class="custom-log-row-column-label muted">Files :</div>
<div class="custom-log-row-column">
<ul>
<% log.site_log_files.each do |file| %>
<li><%= 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} %></li>
<% end %>
</ul>
</div>
</div>
<% end %>
<div class="custom-log-row">
<div class="custom-log-row-column-label muted">Content :</div>
<div class="custom-log-row-column"><%= log.content.html_safe %></div>
</div>
<div class="custom-log-edit">
<a href="<%= edit_admin_customization_log_path(log) %>" class="btn btn-small btn-primary">Edit</a>
<a href="<%= archive_admin_customization_log_path(log) %>" data-id="<%= log.id.to_s %>" class="btn btn-small btn-warning archive-btn">Archive</a>
</div>
</div>
<% if i != (@logs.length - 1) %>
<hr />
<% end %>
<% end %>