table builder: fix various incorrect css classes.
Change calling convention to explicitly indicate whether the attributes are for the <th> element or the <td> element. Fixes various cases where the two were mixed up. * Fix .col-expand classes not being set correctly on the /post_versions, /pool_versions, and /notes pages. * Fix .updater and .updated-at classes not being set correctly on the /forum_topics page. * Fix the name param being ignored (noticeable in the post count field on the /tags page). * Don't pass empty string when column has no name.
This commit is contained in:
@@ -2,12 +2,14 @@ class TableBuilder
|
||||
class Column
|
||||
attr_reader :attribute, :name, :block, :header_attributes, :body_attributes
|
||||
|
||||
def initialize(attribute = nil, header_attributes=nil, body_attributes=nil, &block)
|
||||
def initialize(attribute = nil, th: {}, td: {}, width: nil, name: nil, &block)
|
||||
@attribute = attribute
|
||||
@header_attributes = header_attributes
|
||||
@body_attributes = body_attributes
|
||||
@name = attribute.kind_of?(String) ? attribute : attribute.to_s.titleize
|
||||
@header_attributes = { width: width, **th }
|
||||
@body_attributes = td
|
||||
@block = block
|
||||
|
||||
@name = name || attribute
|
||||
@name = @name.to_s.titleize unless @name.kind_of?(String)
|
||||
end
|
||||
|
||||
def value(item, i, j)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<%= compact_time commentary_version.updated_at %>
|
||||
<% end %>
|
||||
<% if artist_commentary_versions_listing_type == :revert %>
|
||||
<% t.column "", {width: "7%"} do |commentary_version| %>
|
||||
<% t.column width: "7%" do |commentary_version| %>
|
||||
<%= 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 %>
|
||||
<% end %>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<%= artist_version_other_names_diff(artist_version) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% t.column "URLs", nil, {class: "col-expand"} do |artist_version| %>
|
||||
<% t.column "URLs", td: {class: "col-expand"} do |artist_version| %>
|
||||
<%= artist_version_urls_diff(artist_version) if artist_version.visible? %>
|
||||
<% end %>
|
||||
<% t.column "Updated" do |artist_version| %>
|
||||
@@ -34,7 +34,7 @@
|
||||
</p>
|
||||
<% end %>
|
||||
<% if artist_versions_listing_type == :revert %>
|
||||
<% t.column "" do |artist_version| %>
|
||||
<% t.column do |artist_version| %>
|
||||
<td><%= 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?" %></td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
(group: <%= link_to artist.group_name, artist %>)
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% t.column "Other Names", nil, {class: "col-expand"} do |artist| %>
|
||||
<% t.column "Other Names", td: {class: "col-expand"} do |artist| %>
|
||||
<% artist.other_names.each do |name| %>
|
||||
<%= link_to name, artists_path(search: { any_name_matches: name }), class: "artist-other-name" %>
|
||||
<% end %>
|
||||
@@ -27,7 +27,7 @@
|
||||
<% t.column "Updated" do |artist| %>
|
||||
<%= time_ago_in_words_tagged(artist.updated_at) %>
|
||||
<% end %>
|
||||
<% t.column "" do |artist| %>
|
||||
<% t.column do |artist| %>
|
||||
<% if CurrentUser.is_member? %>
|
||||
<%= link_to "Edit", edit_artist_path(artist) %>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<% t.column "Duration" do |ban| %>
|
||||
<%= humanized_duration(ban.created_at, ban.expires_at) %>
|
||||
<% end %>
|
||||
<% t.column "Reason", nil, {class: "col-expand"} do |ban| %>
|
||||
<% t.column "Reason", td: {class: "col-expand"} do |ban| %>
|
||||
<div class="prose">
|
||||
<%= format_text ban.reason %>
|
||||
</div>
|
||||
@@ -22,7 +22,7 @@
|
||||
<%= link_to "»", bans_path(search: { banner_name: ban.banner.name }) %>
|
||||
<div><%= time_ago_in_words_tagged(ban.created_at) %></div>
|
||||
<% end %>
|
||||
<% t.column "" do |ban| %>
|
||||
<% t.column do |ban| %>
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<%= link_to "Edit", edit_ban_path(ban) %>
|
||||
| <%= link_to "Delete", ban_path(ban), :method => :delete, :remote => true %>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<%= link_to "»", bulk_update_requests_path(search: { user_name: request.user.name }) %>
|
||||
<div><%= time_ago_in_words_tagged(request.created_at) %></div>
|
||||
<% end %>
|
||||
<% t.column "" do |request| %>
|
||||
<% t.column do |request| %>
|
||||
<%= link_to "Show", bulk_update_request_path(request) %> |
|
||||
<%= render "bulk_update_requests/bur_edit_links", bur: request %>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<% t.column "Post" do |vote| %>
|
||||
<%= PostPresenter.preview(vote.comment.post, show_deleted: true) %>
|
||||
<% end %>
|
||||
<% t.column "Comment", nil, {class: "col-expand"} do |vote| %>
|
||||
<% t.column "Comment", td: {class: "col-expand"} do |vote| %>
|
||||
<div class="prose">
|
||||
<%= format_text(vote.comment.body) %>
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@
|
||||
<%= link_to "»", comment_votes_path(search: { user_name: vote.user.name }) %>
|
||||
<div><%= time_ago_in_words_tagged(vote.created_at) %></div>
|
||||
<% end %>
|
||||
<% t.column "" do |vote| %>
|
||||
<% t.column do |vote| %>
|
||||
<% if vote.user == CurrentUser.user %>
|
||||
<%= link_to "unvote", comment_comment_votes_path(vote.comment), remote: true, method: :delete %>
|
||||
<% end %>
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<% t.column "Name" do |job| %>
|
||||
<%= raw print_name(job) %>
|
||||
<% end %>
|
||||
<% t.column "Handler", nil, {class: "col-expand"} do |job| %>
|
||||
<% t.column "Handler", td: {class: "col-expand"} do |job| %>
|
||||
<%= raw print_handler(job) %>
|
||||
<% end %>
|
||||
<% t.column :attempts %>
|
||||
<% t.column "Last error", nil, {class: "col-expand"} do |job| %>
|
||||
<% t.column "Last error", td: {class: "col-expand"} do |job| %>
|
||||
<% if job.last_error %>
|
||||
<%= job.last_error.split(/\n/)[0] %>
|
||||
<%= job.last_error.split(/\n/)[1..-1].grep(/releases/).join("\n") %>
|
||||
@@ -23,7 +23,7 @@
|
||||
<% t.column "Run at" do |job| %>
|
||||
<%= time_ago_in_words_tagged(job.run_at) %>
|
||||
<% end %>
|
||||
<% t.column "" do |job| %>
|
||||
<% t.column do |job| %>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<% if job.locked_at? %>
|
||||
Running
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<%= link_to dmail.title, dmail_path(dmail) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% t.column "" do |dmail| %>
|
||||
<% t.column do |dmail| %>
|
||||
<%= link_to "delete", dmail_path(dmail), :method => :delete, :data => {:confirm => "Are you sure you want to delete this Dmail?"} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% t.column "Link", {}, class: "col-expand" do |dtext_link| %>
|
||||
<% t.column "Link", td: { class: "col-expand" } do |dtext_link| %>
|
||||
<% if dtext_link.external_link? %>
|
||||
<%= external_link_to(dtext_link.link_target) %>
|
||||
<% elsif dtext_link.wiki_link? %>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div id="a-index">
|
||||
|
||||
<%= table_for @favorite_groups, width: "100%" do |t| %>
|
||||
<% t.column nil, {width: "5%"} %>
|
||||
<% t.column "Name", {width: "60%"} do |favgroup| %>
|
||||
<%= link_to favgroup.pretty_name, favorite_group_path(favgroup) %>
|
||||
<% if favgroup.post_count > CurrentUser.user.per_page %>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<%= link_to "Forum ##{forum_post_vote.forum_post_id}", forum_post_vote.forum_post %>
|
||||
<%= link_to "»", forum_post_votes_path(search: { forum_post_id: forum_post_vote.forum_post_id }) %>
|
||||
<% end %>
|
||||
<% t.column "Forum Topic", nil, {class: "col-expand"} do |forum_post_vote| %>
|
||||
<% t.column "Forum Topic", td: {class: "col-expand"} do |forum_post_vote| %>
|
||||
<%= link_to forum_post_vote.forum_post.topic.title, forum_post_vote.forum_post.topic %>
|
||||
<% end %>
|
||||
<% t.column "Score" do |forum_post_vote| %>
|
||||
@@ -31,7 +31,7 @@
|
||||
<%= link_to "»", forum_post_votes_path(search: { creator_name: forum_post_vote.creator.name }) %>
|
||||
<div><%= time_ago_in_words_tagged(forum_post_vote.created_at) %></div>
|
||||
<% end %>
|
||||
<% t.column "" do |forum_post_vote| %>
|
||||
<% t.column do |forum_post_vote| %>
|
||||
<% if forum_post_vote.creator == CurrentUser.user %>
|
||||
<%= link_to "unvote", forum_post_vote_path(forum_post_vote, format: "js"), remote: true, method: :delete %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div id="a-index">
|
||||
|
||||
<%= table_for @forum_posts, width: "100%" do |t| %>
|
||||
<% t.column "Topic", nil, {class: "forum-post-topic-title"} do |forum_post| %>
|
||||
<% t.column "Topic", td: {class: "forum-post-topic-title"} do |forum_post| %>
|
||||
<%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %>
|
||||
<% end %>
|
||||
<% t.column "Excerpt", nil, {class: "forum-post-excerpt"} do |forum_post| %>
|
||||
<% t.column "Excerpt", td: {class: "forum-post-excerpt"} do |forum_post| %>
|
||||
<%= link_to truncate(forum_post.body, :length => 50), forum_post_path(forum_post) %>
|
||||
<% end %>
|
||||
<% t.column "Creator" do |forum_post| %>
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
<% t.column "Creator" do |topic| %>
|
||||
<%= link_to_user topic.creator %>
|
||||
<% end %>
|
||||
<% t.column "Updated by", {class: "updater"} do |topic| %>
|
||||
<% t.column "Updated by", th: { class: "updater" }, td: { class: "updater" } do |topic| %>
|
||||
<%= link_to_user topic.updater %>
|
||||
<% end %>
|
||||
<% t.column "Updated at", {class: "updated-at"} do |topic| %>
|
||||
<% t.column "Updated at", th: { class: "updated-at" }, td: { class: "updated-at" } do |topic| %>
|
||||
<%= compact_time topic.updated_at %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<% t.column "Date" do |ip| %>
|
||||
<%= time_ago_in_words_tagged ip.created_at %>
|
||||
<% end %>
|
||||
<% t.column "" do |ip| %>
|
||||
<% t.column do |ip| %>
|
||||
<%= link_to "IP info", "https://ipinfo.io/#{ip.ip_addr}" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<%= link_to_user ip_ban.creator %>
|
||||
<% end %>
|
||||
<% t.column :reason %>
|
||||
<% t.column "" do |ip_ban| %>
|
||||
<% t.column do |ip_ban| %>
|
||||
<%= link_to "Unban", ip_ban_path(ip_ban), :remote => true, :method => :delete, :data => {:confirm => "Do your really want to unban #{ip_ban.ip_addr}?"} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<% t.column "Category" do |mod_action| %>
|
||||
<%= link_to mod_action.category.humanize, mod_actions_path(search: { category: mod_action.category_id }) %>
|
||||
<% end %>
|
||||
<% t.column "Message", nil, {class: "col-expand"} do |mod_action| %>
|
||||
<% t.column "Message", td: {class: "col-expand"} do |mod_action| %>
|
||||
<%= format_text(mod_action.description) %>
|
||||
<% end %>
|
||||
<% t.column "Created" do |mod_action| %>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<%= link_to "post ##{post_disapproval.post_id}", post_path(post_disapproval.post_id) %>
|
||||
<%= link_to "»", moderator_post_disapprovals_path(search: params[:search].merge(post_id: post_disapproval.post_id)) %>
|
||||
<% end %>
|
||||
<% t.column "Message", nil, {class: "col-expand"} do |post_disapproval| %>
|
||||
<% t.column "Message", td: {class: "col-expand"} do |post_disapproval| %>
|
||||
<div class="prose">
|
||||
<%= format_text(post_disapproval.message) %>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<%= link_to_user news_update.creator %>
|
||||
<% end %>
|
||||
<% t.column :message %>
|
||||
<% t.column "" do |news_update| %>
|
||||
<% t.column do |news_update| %>
|
||||
<%= link_to "Edit", edit_news_update_path(news_update) %>
|
||||
| <%= link_to "Delete", news_update_path(news_update), :method => :delete %>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<%= link_to "»", note_versions_path(search: {note_id: note_version.note_id}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% t.column "Body", nil, {class: "col-expand"} do |note_version| %>
|
||||
<% t.column "Body", td: {class: "col-expand"} do |note_version| %>
|
||||
<%= h(note_version.body) %>
|
||||
<% unless note_version.is_active? %>
|
||||
<span class="inactive">(deleted)</span>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<%= link_to "#{note.id}.#{note.version}", post_path(note.post_id, anchor: "note-#{note.id}") %>
|
||||
<%= link_to "»", note_versions_path(search: { note_id: note.id }) %>
|
||||
<% end %>
|
||||
<% t.column "Body", class: "col-expand" do |note| %>
|
||||
<% t.column "Body", td: { class: "col-expand" } do |note| %>
|
||||
<%= note.body %>
|
||||
<% unless note.is_active? %>
|
||||
<span class="inactive">(deleted)</span>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<%= link_to pool_version.pretty_name, pool_path(pool_version.pool_id), class: "pool-category-#{pool_version.pool.category}" %>
|
||||
<%= link_to "»", pool_versions_path(search: { pool_id: pool_version.pool_id }), class: "pool-category-#{pool_version.pool.category}" %>
|
||||
<% end %>
|
||||
<% t.column "Changes", class: "col-expand" do |pool_version| %>
|
||||
<% t.column "Changes", td: { class: "col-expand" } do |pool_version| %>
|
||||
<%= render "pool_versions/diff", diff: pool_version.build_diff %>
|
||||
<% end %>
|
||||
<% t.column "Post Count" do |pool_version| %>
|
||||
@@ -29,7 +29,7 @@
|
||||
<%= compact_time pool_version.updated_at %>
|
||||
<% end %>
|
||||
<% if pool_versions_listing_type == :revert %>
|
||||
<% t.column "" do |pool_version| %>
|
||||
<% t.column do |pool_version| %>
|
||||
<%= link_to "Revert to", revert_pool_path(pool_version.pool_id, :version_id => pool_version.id), :method => :put, :remote => true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<%= render "search", :path => pools_path %>
|
||||
|
||||
<%= table_for @pools, width: "100%" do |t| %>
|
||||
<% t.column nil, {width: "5%"} %>
|
||||
<% t.column "Name", {width: "60%"} do |pool| %>
|
||||
<span class="pool-category-<%= pool.category %>"><%= link_to pool.pretty_name, pool_path(pool) %></span>
|
||||
<% if pool.is_deleted? %>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h1>Post Events</h1>
|
||||
|
||||
<%= table_for @events, class: "striped autofit", width: "100%" do |t| %>
|
||||
<% t.column :type_name, nil, { name: "Type" } %>
|
||||
<% t.column :type_name, name: "Type" %>
|
||||
<% t.column "User" do |event| %>
|
||||
<% if event.is_creator_visible? %>
|
||||
<%= link_to_user event.creator %>
|
||||
@@ -12,12 +12,12 @@
|
||||
<% end %>
|
||||
<br><%= time_ago_in_words_tagged event.created_at %>
|
||||
<% end %>
|
||||
<% t.column "Description", {}, { class: "col-expand" } do |event| %>
|
||||
<% t.column "Description", td: { class: "col-expand" } do |event| %>
|
||||
<div class="prose">
|
||||
<%= format_text event.reason %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% t.column :is_resolved, {}, name: "Resolved" %>
|
||||
<% t.column :is_resolved, name: "Resolved" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<%= table_for @post_versions, {id: "post-versions-table", class: "striped autofit"} do |t| %>
|
||||
<% if CurrentUser.user.is_builder? %>
|
||||
<% t.column tag.label(tag.input type: :checkbox, id: "post-version-select-all-checkbox", class: "post-version-select-checkbox"), { class: "post-version-select-column" } do |post_version| %>
|
||||
<% t.column tag.label(tag.input type: :checkbox, id: "post-version-select-all-checkbox", class: "post-version-select-checkbox"), th: { class: "post-version-select-column" }, td: { class: "post-version-select-column" } do |post_version| %>
|
||||
<input type="checkbox" class="post-version-select-checkbox" <%= "disabled" unless post_version.can_undo?(CurrentUser.user) %>>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -17,7 +17,7 @@
|
||||
<% t.column "Version" do |post_version| %>
|
||||
<%= link_to "#{post_version.post_id}.#{post_version.version}", post_versions_path(search: { post_id: post_version.post_id }, anchor: "post-version-#{post_version.id}") %>
|
||||
<% end %>
|
||||
<% t.column "Tags", {class: "col-expand"} do |post_version| %>
|
||||
<% t.column "Tags", td: {class: "col-expand"} do |post_version| %>
|
||||
<%= post_version_diff(post_version) %>
|
||||
<% end %>
|
||||
<% t.column "Updated" do |post_version| %>
|
||||
@@ -30,7 +30,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% t.column "" do |post_version| %>
|
||||
<% t.column do |post_version| %>
|
||||
<% if post_version.can_undo?(CurrentUser.user) %>
|
||||
<%= link_to "Undo", undo_post_version_path(post_version), method: :put, remote: true, class: "post-version-undo-link" %>
|
||||
<% end %>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<% t.column "Post" do |vote| %>
|
||||
<%= PostPresenter.preview(vote.post, show_deleted: true) %>
|
||||
<% end %>
|
||||
<% t.column "Tags", nil, {class: "col-expand"} do |vote| %>
|
||||
<% t.column "Tags", td: {class: "col-expand"} do |vote| %>
|
||||
<%= TagSetPresenter.new(vote.post.tag_array).inline_tag_list_html %>
|
||||
<% end %>
|
||||
<% t.column "Score" do |vote| %>
|
||||
@@ -28,7 +28,7 @@
|
||||
<%= link_to "»", post_votes_path(search: { user_name: vote.user.name }) %>
|
||||
<div><%= time_ago_in_words_tagged(vote.created_at) %></div>
|
||||
<% end %>
|
||||
<% t.column "" do |vote| %>
|
||||
<% t.column do |vote| %>
|
||||
<% if vote.user == CurrentUser.user %>
|
||||
<%= link_to "unvote", post_post_votes_path(vote.post), remote: true, method: :delete %>
|
||||
<% end %>
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
<% end %>
|
||||
|
||||
<%= table_for @saved_searches, {class: "striped autofit", width: "100%"} do |t| %>
|
||||
<% t.column "Query", {"data-sort": "string"}, {class: "col-expand"} do |ss| %>
|
||||
<% t.column "Query", th: {"data-sort": "string"}, td: {class: "col-expand"} do |ss| %>
|
||||
<%= link_to ss.query, posts_path(tags: ss.query) %>
|
||||
<% end %>
|
||||
<% t.column "Labels", {"data-sort": "string"} do |ss| %>
|
||||
<% t.column "Labels", th: {"data-sort": "string"} do |ss| %>
|
||||
<% ss.labels.each do |label| %>
|
||||
<%= link_to label, posts_path(:tags => "search:#{label}") %>
|
||||
<% end %>
|
||||
@@ -36,7 +36,7 @@
|
||||
<% t.column "Created" do |ss| %>
|
||||
<%= time_ago_in_words_tagged ss.created_at %>
|
||||
<% end %>
|
||||
<% t.column "", {class: "links"}, {class: "links"} do |ss| %>
|
||||
<% t.column th: {class: "links"}, td: {class: "links"} do |ss| %>
|
||||
<%= link_to "edit", edit_saved_search_path(ss) %>
|
||||
| <%= link_to "delete", saved_search_path(ss), :method => :delete, :remote => true %>
|
||||
<% end %>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<% t.column "Status", {width: "5%"} do |tag_alias| %>
|
||||
<span id="tag-alias-status-for-<%= tag_alias.id %>"><%= tag_alias.status %></span>
|
||||
<% end %>
|
||||
<% t.column "", {width: "15%"} do |tag_alias| %>
|
||||
<% t.column width: "15%" do |tag_alias| %>
|
||||
<%= link_to "Show", tag_alias_path(tag_alias) %>
|
||||
|
||||
<% if tag_alias.is_pending? && tag_alias.editable_by?(CurrentUser.user) %>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<% t.column "Status", {width: "5%"} do |tag_implication| %>
|
||||
<span id="tag-implication-status-for-<%= tag_implication.id %>"><%= tag_implication.status %></span>
|
||||
<% end %>
|
||||
<% t.column "", {width: "15%"} do |tag_implication| %>
|
||||
<% t.column width: "15%" do |tag_implication| %>
|
||||
<%= link_to "Show", tag_implication_path(tag_implication) %>
|
||||
|
||||
<% if tag_implication.is_pending? && tag_implication.editable_by?(CurrentUser.user) %>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<%= render "search" %>
|
||||
|
||||
<%= table_for @tags, {class: "striped autofit"} do |t| %>
|
||||
<% t.column :post_count, nil, {name: "Count"} %>
|
||||
<% t.column "Name", nil, {class: "col-expand"} do |tag| %>
|
||||
<% t.column :post_count, name: "Count" %>
|
||||
<% t.column "Name", td: {class: "col-expand"} do |tag| %>
|
||||
<%= link_to_wiki "?", tag.name, class: "tag-type-#{tag.category}" %>
|
||||
<%= link_to tag.name, posts_path(tags: tag.name), class: "tag-type-#{tag.category}" %>
|
||||
<% end %>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<% t.column "Upload" do |upload| %>
|
||||
<%= PostPresenter.preview(upload.post, tags: "user:#{upload.uploader.name}", show_deleted: true) %>
|
||||
<% end %>
|
||||
<% t.column "Info", nil, {class: "col-expand upload-info"} do |upload| %>
|
||||
<% t.column "Info", td: {class: "col-expand upload-info"} do |upload| %>
|
||||
<span class="info">
|
||||
<strong>Upload</strong>
|
||||
<%= link_to "##{upload.id}", upload %>
|
||||
@@ -54,7 +54,7 @@
|
||||
<%= link_to "»", uploads_path(search: params[:search].merge(uploader_name: upload.uploader.name)) %>
|
||||
<br><%= time_ago_in_words_tagged upload.created_at %>
|
||||
<% end %>
|
||||
<% t.column "Status", nil, {class: "col-normal"} do |upload| %>
|
||||
<% t.column "Status", td: {class: "col-normal"} do |upload| %>
|
||||
<%= render_status(upload) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<%= link_to_user feedback.user %>
|
||||
<%= link_to "»", user_feedbacks_path(search: { user_name: feedback.user.name }) %>
|
||||
<% end %>
|
||||
<% t.column "Message", nil, {class: "col-expand"} do |feedback| %>
|
||||
<% t.column "Message", td: {class: "col-expand"} do |feedback| %>
|
||||
<div class="prose">
|
||||
<%= format_text(feedback.body) %>
|
||||
</div>
|
||||
@@ -37,7 +37,7 @@
|
||||
<%= link_to "»", user_feedbacks_path(search: { creator_name: feedback.creator.name }) %>
|
||||
<div><%= time_ago_in_words_tagged(feedback.created_at) %></div>
|
||||
<% end %>
|
||||
<% t.column "" do |feedback| %>
|
||||
<% t.column do |feedback| %>
|
||||
<% if feedback.editable_by?(CurrentUser.user) %>
|
||||
<%= link_to "edit", edit_user_feedback_path(feedback) %>
|
||||
<% if feedback.deletable_by?(CurrentUser.user) && !feedback.is_deleted? %>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<% t.column "Date" do |change_request| %>
|
||||
<%= compact_time change_request.created_at %>
|
||||
<% end %>
|
||||
<% t.column "" do |change_request| %>
|
||||
<% t.column do |change_request| %>
|
||||
<%= link_to "view", user_name_change_request_path(change_request) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h1>Users</h1>
|
||||
|
||||
<%= table_for @users, width: "100%" do |t| %>
|
||||
<% t.column "" do |user| %>
|
||||
<% t.column do |user| %>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<%= link_to "Edit", edit_admin_user_path(user) %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div id="p-global-listing">
|
||||
|
||||
<%= table_for @wiki_page_versions, width: "100%" do |t| %>
|
||||
<% t.column "", {width: "3%"} do |wiki_page_version| %>
|
||||
<% t.column width: "3%" do |wiki_page_version| %>
|
||||
<%= link_to_if wiki_page_version.previous.present?, "diff", diff_wiki_page_versions_path(otherpage: wiki_page_version.previous.try(:id), thispage: wiki_page_version.id) %>
|
||||
<% end %>
|
||||
<% t.column "Title" do |wiki_page_version| %>
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<%= form_tag(diff_wiki_page_versions_path, :method => :get) do %>
|
||||
|
||||
<%= table_for @wiki_page_versions, width: "100%" do |t| %>
|
||||
<% t.column "", {width: "3%"} do |wiki_page_version, i| %>
|
||||
<% t.column width: "3%" do |wiki_page_version, i| %>
|
||||
<% if i < @wiki_page_versions.length - 1 %>
|
||||
<%= link_to "diff", diff_wiki_page_versions_path(:otherpage => wiki_page_version.id, :thispage => @wiki_page_versions[i + 1].id) %>
|
||||
<% else %>
|
||||
diff
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% t.column "", {width: "2%"} do |wiki_page_version, i| %>
|
||||
<% t.column width: "2%" do |wiki_page_version, i| %>
|
||||
<%= radio_button_tag "thispage", wiki_page_version.id, (i == 1) %>
|
||||
<% end %>
|
||||
<% t.column "", {width: "2%"} do |wiki_page_version, i| %>
|
||||
<% t.column width: "2%" do |wiki_page_version, i| %>
|
||||
<%= radio_button_tag "otherpage", wiki_page_version.id, (i == 0) %>
|
||||
<% end %>
|
||||
<% t.column "Title" do |wiki_page_version| %>
|
||||
|
||||
Reference in New Issue
Block a user