diff --git a/app/views/artist_commentary_versions/_revert_listing.html.erb b/app/views/artist_commentary_versions/_revert_listing.html.erb new file mode 100644 index 000000000..226cac309 --- /dev/null +++ b/app/views/artist_commentary_versions/_revert_listing.html.erb @@ -0,0 +1,50 @@ +
| Post | +Original | +Translated | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Edited By | +Date | + <% if CurrentUser.is_member? %> ++ <% end %> + |
|---|---|---|---|---|---|---|
| <%= link_to commentary_version.post_id, post_path(commentary_version.post_id) %> | +
+ <%= h(commentary_version.original_title) %>+
+ <%= format_text(commentary_version.original_description, :disable_mentions => true) %>
+
+ |
+
+ <%= h(commentary_version.translated_title) %>+
+ <%= format_text(commentary_version.translated_description, :disable_mentions => true) %>
+
+ |
+ <% if CurrentUser.is_moderator? %>
+ + <%= link_to_ip commentary_version.updater_ip_addr %> + | + <% end %> +<%= link_to_user commentary_version.updater %> | +<%= compact_time commentary_version.updated_at %> | + <% if CurrentUser.is_member? %> ++ <%= link_to "Revert to", revert_artist_commentary_path(commentary_version.post_id, :version_id => commentary_version.id), :remote => true, :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> + | + <% end %> +
| Post | +Version | +Original | +Translated | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Edited By | +Date | +
|---|---|---|---|---|---|---|
| <%= PostPresenter.preview(commentary_version.post, :tags => "status:any") %> | +<%= link_to "#{commentary_version.post_id}.#{commentary_version.id}»", artist_commentary_versions_path(search: {post_id: commentary_version.post_id}) %> | +
+ <%= h(commentary_version.original_title) %>+
+ <%= format_text(commentary_version.original_description, :disable_mentions => true) %>
+
+ |
+
+ <%= h(commentary_version.translated_title) %>+
+ <%= format_text(commentary_version.translated_description, :disable_mentions => true) %>
+
+ |
+ <% if CurrentUser.is_moderator? %>
+ + <%= link_to_ip commentary_version.updater_ip_addr %> + | + <% end %> +<%= link_to_user commentary_version.updater %> | +<%= compact_time commentary_version.updated_at %> | +
| Post | -Original | -Translated | - <% if CurrentUser.is_moderator? %> -IP Address | - <% end %> -Edited By | -Date | - <% if CurrentUser.is_member? %> -- <% end %> - |
|---|---|---|---|---|---|---|
| - <% if params.dig(:search, :post_id).present? %> - <%= link_to commentary_version.post_id, post_path(commentary_version.post_id) %> - <% else %> - <%= PostPresenter.preview(commentary_version.post, :tags => "status:any") %> - <% end %> - | -
- <%= h(commentary_version.original_title) %>-
- <%= format_text(commentary_version.original_description, :disable_mentions => true) %>
-
- |
-
- <%= h(commentary_version.translated_title) %>-
- <%= format_text(commentary_version.translated_description, :disable_mentions => true) %>
-
- |
- <% if CurrentUser.is_moderator? %>
- - <%= link_to_ip commentary_version.updater_ip_addr %> - | - <% end %> -<%= link_to_user commentary_version.updater %> | -<%= compact_time commentary_version.updated_at %> | - <% if CurrentUser.is_member? %> -- <%= link_to "Revert to", revert_artist_commentary_path(commentary_version.post_id, :version_id => commentary_version.id), :remote => true, :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> - | - <% end %> -
| Name | +Other Names | +Group | +Updated | +Updated by | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Active | +URLs | + <% if CurrentUser.is_member? %> ++ <% end %> + | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= link_to artist_version.name, artist_path(artist_version.artist_id) %> | +<%= artist_version_other_names_diff(artist_version) %> | +<%= artist_version.group_name %> | + <% else %> ++ | + | + <% end %> + | <%= compact_time artist_version.created_at %> | +<%= link_to_user artist_version.updater %> | + <% if CurrentUser.is_moderator? %> ++ <%= link_to_ip artist_version.updater_ip_addr %> + | + <% end %> +<%= artist_version.is_active? %> | + <% if artist_version.visible? %> +<%= artist_version_urls_diff(artist_version) %> | + <% else %> ++ <% end %> + <% if CurrentUser.is_member? %> + | + <%= link_to "Revert to", revert_artist_path(artist_version.artist_id, :version_id => artist_version.id), :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> + | + <% end %> +
| Name | +Other Names | +Group | +Updated | +Updated by | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Active | +URLs | +||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| + <%= link_to artist_version.name, artist_path(artist_version.artist_id) %> + <%= link_to "»", artist_versions_path(search: {artist_id: artist_version.artist_id}) %> + | +<%= artist_version_other_names_diff(artist_version) %> | +<%= artist_version.group_name %> | + <% else %> ++ | + | + <% end %> + | <%= compact_time artist_version.created_at %> | +<%= link_to_user artist_version.updater %> | + <% if CurrentUser.is_moderator? %> ++ <%= link_to_ip artist_version.updater_ip_addr %> + | + <% end %> +<%= artist_version.is_active? %> | + <% if artist_version.visible? %> +<%= artist_version_urls_diff(artist_version) %> | + <% else %> ++ <% end %> + |
| Name | -Other Names | -Group | -Updated | -Updated by | - <% if CurrentUser.is_moderator? %> -IP Address | - <% end %> -Active | -URLs | - <% if CurrentUser.is_member? %> -- <% end %> - | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= link_to artist_version.name, artist_path(artist_version.artist_id) %> | -<%= artist_version_other_names_diff(artist_version) %> | -<%= artist_version.group_name %> | - <% else %> -- | - | - <% end %> - | <%= compact_time artist_version.created_at %> | -<%= link_to_user artist_version.updater %> | - <% if CurrentUser.is_moderator? %> -- <%= link_to_ip artist_version.updater_ip_addr %> - | - <% end %> -<%= artist_version.is_active? %> | - <% if artist_version.visible? %> -<%= artist_version_urls_diff(artist_version) %> | - <% else %> -- <% end %> - <% if CurrentUser.is_member? %> - | - <%= link_to "Revert to", revert_artist_path(artist_version.artist_id, :version_id => artist_version.id), :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> - | - <% end %> -
| + | Post | +Note | +Body | +Position | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Edited By | +Date | + <% if CurrentUser.is_member? %> ++ <% end %> + |
|---|---|---|---|---|---|---|---|---|
| + | + <%= link_to note_version.post_id, post_path(note_version.post_id) %> + <% if params.dig(:search, :note_id).present? %> + <%= link_to "»", note_versions_path(search: {post_id: note_version.post_id}) %> + <% end %> + | ++ <%= link_to "#{note_version.note_id}.#{note_version.version}", post_path(note_version.post_id, anchor: "note-#{note_version.note_id}") %> + <% if params.dig(:search, :post_id).present? %> + <%= link_to "»", note_versions_path(search: {note_id: note_version.note_id}) %> + <% end %> + | ++ <%= h(note_version.body) %> + <% unless note_version.is_active? %> + (deleted) + <% end %> + <%= note_version_body_diff_info(note_version) %> + | ++ <%= note_version_position_diff(note_version) %> + | + <% if CurrentUser.is_moderator? %> ++ <%= link_to_ip note_version.updater_ip_addr %> + | + <% end %> +<%= link_to_user note_version.updater %> | +<%= compact_time note_version.updated_at %> | + <% if CurrentUser.is_member? %> ++ <%= link_to "Revert to", revert_note_path(note_version.note_id, :version_id => note_version.id), :remote => true, :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> + | + <% end %> +
| + | Post | +Note | +Body | +Position | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Edited By | +Date | +
|---|---|---|---|---|---|---|---|
| + | + <%= link_to note_version.post_id, post_path(note_version.post_id) %> + <%= link_to "»", note_versions_path(search: {post_id: note_version.post_id}) %> + | ++ <%= link_to "#{note_version.note_id}.#{note_version.version}", post_path(note_version.post_id, anchor: "note-#{note_version.note_id}") %> + <%= link_to "»", note_versions_path(search: {note_id: note_version.note_id}) %> + | ++ <%= h(note_version.body) %> + <% unless note_version.is_active? %> + (deleted) + <% end %> + <%= note_version_body_diff_info(note_version) %> + | ++ <%= note_version_position_diff(note_version) %> + | + <% if CurrentUser.is_moderator? %> ++ <%= link_to_ip note_version.updater_ip_addr %> + | + <% end %> +<%= link_to_user note_version.updater %> | +<%= compact_time note_version.updated_at %> | +
| - | Post | -Note | -Body | -Position | - <% if CurrentUser.is_moderator? %> -IP Address | - <% end %> -Edited By | -Date | - <% if CurrentUser.is_member? %> -- <% end %> - |
|---|---|---|---|---|---|---|---|---|
| - | <%= link_to note_version.post_id, post_path(note_version.post_id) %> | -- <%= link_to "#{note_version.note_id}.#{note_version.version}", post_path(note_version.post_id, anchor: "note-#{note_version.note_id}") %> - <%= link_to "»", note_versions_path(search: {note_id: note_version.note_id}) %> - | -- <%= h(note_version.body) %> - <% unless note_version.is_active? %> - (deleted) - <% end %> - <%= note_version_body_diff_info(note_version) %> - | -- <%= note_version_position_diff(note_version) %> - | - <% if CurrentUser.is_moderator? %> -- <%= link_to_ip note_version.updater_ip_addr %> - | - <% end %> -<%= link_to_user note_version.updater %> | -<%= compact_time note_version.updated_at %> | - <% if CurrentUser.is_member? %> -- <%= link_to "Revert to", revert_note_path(note_version.note_id, :version_id => note_version.id), :remote => true, :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %> - | - <% end %> -
| Pool | +Post Count | +Changes | +Desc Chg | +Updater | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Date | + <% if CurrentUser.is_member? %> ++ <% end %> + |
|---|---|---|---|---|---|---|---|
| <%= link_to pool_version.pretty_name, pool_path(pool_version.pool_id), :class => "pool-category-#{pool_version.pool.category}" %> | +<%= link_to pool_version.post_ids.size, pool_versions_path(:search => {:pool_id => pool_version.pool_id}) %> | +<%= pool_version_diff(pool_version) %> | +<%= link_to_if pool_version.description_changed, pool_version.description_changed, diff_pool_version_path(pool_version.id) %> | +<%= link_to_user pool_version.updater %> | + <% if CurrentUser.is_moderator? %> ++ <%= link_to_ip pool_version.updater_ip_addr %> + | + <% end %> +<%= compact_time pool_version.updated_at %> | + <% if CurrentUser.is_member? %> ++ <%= link_to "Revert to", revert_pool_path(pool_version.pool_id, :version_id => pool_version.id), :method => :put, :remote => true %> + | + <% end %> +
| Pool | +Post Count | +Changes | +Desc Chg | +Updater | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Date | +
|---|---|---|---|---|---|---|
| <%= link_to pool_version.pretty_name, pool_path(pool_version.pool_id), :class => "pool-category-#{pool_version.pool.category}" %> | +<%= link_to pool_version.post_ids.size, pool_versions_path(:search => {:pool_id => pool_version.pool_id}) %> | +<%= pool_version_diff(pool_version) %> | +<%= link_to_if pool_version.description_changed, pool_version.description_changed, diff_pool_version_path(pool_version.id) %> | +<%= link_to_user pool_version.updater %> | + <% if CurrentUser.is_moderator? %> ++ <%= link_to_ip pool_version.updater_ip_addr %> + | + <% end %> +<%= compact_time pool_version.updated_at %> | +
| Pool | -Post Count | -Changes | -Desc Chg | -Updater | - <% if CurrentUser.is_moderator? %> -IP Address | - <% end %> -Date | - <% if CurrentUser.is_member? %> -- <% end %> - |
|---|---|---|---|---|---|---|---|
| <%= link_to pool_version.pretty_name, pool_path(pool_version.pool_id), :class => "pool-category-#{pool_version.pool.category}" %> | -<%= link_to pool_version.post_ids.size, pool_versions_path(:search => {:pool_id => pool_version.pool_id}) %> | -<%= pool_version_diff(pool_version) %> | -<%= link_to_if pool_version.description_changed, pool_version.description_changed, diff_pool_version_path(pool_version.id) %> | -<%= link_to_user pool_version.updater %> | - <% if CurrentUser.is_moderator? %> -- <%= link_to_ip pool_version.updater_ip_addr %> - | - <% end %> -<%= compact_time pool_version.updated_at %> | - <% if CurrentUser.is_member? %> -- <%= link_to "Revert to", revert_pool_path(pool_version.pool_id, :version_id => pool_version.id), :method => :put, :remote => true %> - | - <% end %> -
| Post | @@ -17,7 +17,7 @@|||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= link_to("#{post_version.post_id}.#{post_version.id}", post_path(post_version.post_id)) %> | <%= compact_time(post_version.updated_at) %> | diff --git a/app/views/post_versions/_standard_listing.html.erb b/app/views/post_versions/_standard_listing.html.erb new file mode 100644 index 000000000..572671a91 --- /dev/null +++ b/app/views/post_versions/_standard_listing.html.erb @@ -0,0 +1,54 @@ +
| Post | +Date | +User | +Rating | +Parent | + <% if CurrentUser.is_moderator? %> +IP Address | + <% end %> +Tags | + <% if CurrentUser.is_member? %> ++ <% end %> + |
|---|---|---|---|---|---|---|---|
| + <%= link_to("#{post_version.post_id}.#{post_version.id}", post_path(post_version.post_id)) %> + <%= link_to "»", post_versions_path(search: {post_id: post_version.post_id}) %> + | +<%= compact_time(post_version.updated_at) %> | ++ <% if post_version.updater %> + <%= link_to_user(post_version.updater) %> + <% end %> + | +<%= post_version.rating %> | +<%= post_version.parent_id %> | + <% if CurrentUser.is_moderator? %> ++ <%= link_to_ip post_version.updater_ip_addr %> + | + <% end %> +<%= post_version_diff(post_version) %> | + <% if CurrentUser.is_member? %> ++ <% if post_version.visible? %> + <% if post_version.version != 1 %> + <%= link_to "Undo", undo_post_version_path(post_version), :method => :put, :remote => true %> | + <% end %> + <% end %> + | + <% end %> +
<%= link_to "Revert this user's changes", new_user_revert_path(:user_id => params[:lr]) %>