Merge pull request #3989 from evazion/fix-3987

Wiki pages: convert other_names column to array (#3987)
This commit is contained in:
Albert Yi
2018-11-19 16:23:32 -08:00
committed by GitHub
27 changed files with 238 additions and 181 deletions

View File

@@ -14,7 +14,7 @@
<p><%= @artist.name %></p>
<% end %>
</div>
<%= f.input :other_names_comma, :hint => "Separate with commas", :as => :text, :label => "Other names" %>
<%= f.input :other_names_string, :hint => "Separate with spaces", :as => :text, :label => "Other names" %>
<%= f.input :group_name %>
<%= f.input :url_string, :label => "URLs", :as => :text, :input_html => {:size => "50x5", :value => params.dig(:artist, :url_string) || @artist.urls.join("\n")}, :hint => "You can prefix a URL with - to mark it as dead." %>

View File

@@ -7,7 +7,7 @@
<li><strong>Tag Alias</strong> <%= artist.tag_alias_name %></li>
<% end %>
<% if artist.other_names.present? %>
<li><strong>Other Names</strong> <%= link_to_artists(artist.other_names.split(/ /)) %></li>
<li><strong>Other Names</strong> <%= link_to_artists(artist.other_names) %></li>
<% end %>
<% if artist.group_name.present? %>
<li><strong>Group</strong> <%= link_to_artist(artist.group_name) %></li>

View File

@@ -19,7 +19,7 @@
(group: <%= link_to(artist.group_name, artist_path(artist)) %>)
<% end %>
</td>
<td><%= artist.other_names %></td>
<td><%= artist.other_names_string %></td>
<td><%= artist.status %></td>
<% end %>
<% end %>

View File

@@ -8,7 +8,7 @@
<%= f.input :name, :as => :string, :input_html => { :value => @pool.pretty_name } %>
<%= dtext_field "pool", "description" %>
<%= dtext_preview_button "pool", "description" %>
<%= f.input :post_ids, as: :text, label: "Posts", input_html: { value: @pool.post_ids.join(" ") } %>
<%= f.input :post_ids_string, as: :text, label: "Posts" %>
<%= f.input :category, :collection => ["series", "collection"], :include_blank => false %>
<%= f.input :is_active %>
<%= f.button :submit %>

View File

@@ -7,7 +7,7 @@
<%= simple_form_for(@pool) do |f| %>
<%= f.input :name, :as => :string, :required => true %>
<%= dtext_field "pool", "description" %>
<%= f.input :post_ids, as: :text, label: "Posts", input_html: { value: @pool.post_ids.join(" ") } %>
<%= f.input :post_ids_string, as: :text, label: "Posts" %>
<%= f.input :category, :collection => ["series", "collection"], :include_blank => true, :selected => "", :required => true %>
<%= f.input :is_active %>
<%= f.button :submit, "Submit" %>

View File

@@ -10,7 +10,7 @@
<h1 id="wiki-page-title"><%= @wiki_page.pretty_title %></h1>
<% end %>
<%= f.input :other_names, :as => :text, :label => "Other names (<a href='/wiki_pages/help:translated_tags'>view help</a>)".html_safe, :hint => "Names used for this tag on other sites such as Pixiv. Separate with spaces." %>
<%= f.input :other_names_string, as: :text, label: "Other names (#{link_to "help", wiki_pages_path(title: "help:translated_tags")})".html_safe, hint: "Names used for this tag on other sites such as Pixiv. Separate with spaces." %>
<%= dtext_field "wiki_page", "body" %>