Files
danbooru/app/views/wiki_pages/new.html.erb
nonamethanks ea76a889db Add ability to mark tags as deprecated
* Deprecated tags can't be added to posts, but existing deprecated tags
  in a post won't be removed
* Only empty tags can be marked as deprecated manually
* No tags can be manually undeprecated
** These limits don't apply to admins
* Deprecating or undeprecating a tag will create a new mod action to
  prevent people from going rogue
* Added deprecate/undeprecate commands for BURs
* Deprecating a tag via BUR removes all implications to and from it as well
2022-04-08 09:07:14 +02:00

30 lines
1.3 KiB
Plaintext

<%= render "sidebar" %>
<% content_for(:content) do %>
<h1>New Wiki Page</h1>
<% if @wiki_page.title.present? %>
<div class="notice notice-info notice-small" id="new-wiki-page-notice">
This wiki page does not yet exist. The form below will allow you to create a new page for <%= @wiki_page.title %>. It will act as an explanation on how to use the tag for other users on the site.
</div>
<% end %>
<%= edit_form_for(@wiki_page) do |f| %>
<%= f.input :title, error: false, input_html: { data: { autocomplete: "tag" } } %>
<%= f.input :other_names_string, as: :string, label: "Other names (#{link_to_wiki "help", "help:translated_tags"})".html_safe, hint: "Names used for this tag on other sites such as Pixiv. Separate with spaces." %>
<%= f.input :body, as: :dtext %>
<%= f.submit "Submit" %>
<%= dtext_preview_button "wiki_page_body" %>
<% end %>
<%= render "tag_relationships/alias_and_implication_list", tag: @wiki_page.tag %>
<% if @wiki_page.tag&.is_deprecated? %>
<p class="fineprint">This tag is <%= link_to "deprecated", wiki_page_path("help:deprecation_notice") %> and can't be added to new posts.</p>
<% end %>
<%= render "wiki_pages/posts", wiki_page: @wiki_page %>
<% end %>
<%= render "secondary_links" %>