diff options
author | francis <francis> | 2009-02-12 17:24:48 +0000 |
---|---|---|
committer | francis <francis> | 2009-02-12 17:24:48 +0000 |
commit | 9bdcf7ea61d7155560fa3b5aa6de3afcc0defcc4 (patch) | |
tree | 1b7530825ee852098b9a0fb74aa9175242ca0e03 /app/views | |
parent | 92510a71b25a504a8d024488fdace2789ae3c95e (diff) |
Make links clickable in last edit comment.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin_public_body/show.rhtml | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.rhtml index 1e8f2c4e0..abe621cef 100644 --- a/app/views/admin_public_body/show.rhtml +++ b/app/views/admin_public_body/show.rhtml @@ -3,8 +3,13 @@ <h1><%=@title%></h1> <p> -<% for column in PublicBody.content_columns %> - <b><%= column.human_name %>:</b> <%=h @public_body.send(column.name) %> +<% + columns = PublicBody.content_columns + columns.delete_if {|c| ['last_edit_comment'].include?(c.name)} + + for column in columns %> + <b><%= column.human_name %>:</b> + <%=h @public_body.send(column.name) %> <br/> <% end %> <b>Calculated home page:</b> @@ -36,10 +41,15 @@ <% for historic_public_body in @public_body.versions.reverse %> <tr class="<%= cycle('odd', 'even') %>"> <% for column in history_columns %> - <% # Highlight entries which have changed since previous version + <% + value = h(historic_public_body.send(column.name)) + if column.name == 'last_edit_comment' + value = historic_public_body.last_edit_comment_for_html_display + end + # Highlight entries which have changed since previous version changed = (not ['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %> <td <%= changed ? ' class="entry_changed" ': '' %> > - <%=h historic_public_body.send(column.name) %> + <%=value%> </td> <% end %> <td><%=h historic_public_body.updated_at %></td> |