artists: rename is_active flag to is_deleted.
Rename is_active to is_deleted. This is for better consistency with other models, and to reduce confusion over what "active" means for artists. Sometimes users think active is for whether the artist is actively producing work.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<%= search_form_for(artists_path) do |f| %>
|
||||
<%= f.input :any_name_matches, label: "Name", hint: "Use * for wildcard", input_html: { value: params[:search][:any_name_matches], data: { autocomplete: "artist" }} %>
|
||||
<%= f.input :url_matches, label: "URL", as: "string", input_html: { value: params[:search][:url_matches] } %>
|
||||
<%= f.input :is_active, label: "Active?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:is_active] %>
|
||||
<%= f.input :is_deleted, label: "Deleted?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:is_deleted] %>
|
||||
<%= f.input :is_banned, label: "Banned?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:is_banned] %>
|
||||
<%= f.input :has_tag, label: "Has tag?", collection: [["Yes", true], ["No", false]], include_blank: true, selected: params[:search][:has_tag] %>
|
||||
<%= f.input :order, collection: [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"], ["Post count", "post_count"]], selected: params[:search][:order] %>
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<% end %>
|
||||
<%= subnav_link_to "History", artist_versions_path(:search => {:artist_id => @artist.id}) %>
|
||||
<% if CurrentUser.is_member? %>
|
||||
<% if @artist.is_active? %>
|
||||
<%= subnav_link_to "Delete", artist_path(@artist), method: :delete, "data-shortcut": "shift+d", "data-confirm": "Are you sure you want to delete this artist?" %>
|
||||
<% if @artist.is_deleted? %>
|
||||
<%= subnav_link_to "Undelete", artist_path(@artist, format: "js"), method: :put, data: {confirm: "Are you sure you want to undelete this artist?", params: "artist[is_deleted]=false"}, remote: true %>
|
||||
<% else %>
|
||||
<%= subnav_link_to "Undelete", artist_path(@artist, format: "js"), method: :put, data: {confirm: "Are you sure you want to undelete this artist?", params: "artist[is_active]=true"}, remote: true %>
|
||||
<%= subnav_link_to "Delete", artist_path(@artist), method: :delete, "data-shortcut": "shift+d", "data-confirm": "Are you sure you want to delete this artist?" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% t.column "Status" do |artist| %>
|
||||
<% if !artist.is_active? %>
|
||||
<%= link_to "Deleted", artists_path(search: { is_active: false }) %>
|
||||
<% if artist.is_deleted? %>
|
||||
<%= link_to "Deleted", artists_path(search: { is_deleted: true }) %>
|
||||
<% end %>
|
||||
|
||||
<% if artist.is_banned? %>
|
||||
@@ -33,10 +33,10 @@
|
||||
<% if CurrentUser.is_member? %>
|
||||
<%= link_to "Edit", edit_artist_path(artist) %>
|
||||
|
||||
<% if artist.is_active? %>
|
||||
| <%= link_to "Delete", artist_path(artist, artist: { is_active: false }), method: :put, remote: true %>
|
||||
<% if artist.is_deleted? %>
|
||||
| <%= link_to "Undelete", artist_path(artist, artist: { is_deleted: false }), method: :put, remote: true %>
|
||||
<% else %>
|
||||
| <%= link_to "Undelete", artist_path(artist, artist: { is_active: true }), method: :put, remote: true %>
|
||||
| <%= link_to "Delete", artist_path(artist, artist: { is_deleted: true }), method: :put, remote: true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<artists type="array">
|
||||
<% @artists.each do |artist| %>
|
||||
<artist group_name="<%= artist.group_name %>" other_names="<%= artist.other_names %>" urls="<%= artist.urls.map {|x| x.url}.join(" ") %>" is_active="<%= artist.is_active? %>" name="<%= artist.name %>" updater_id="0" id="<%= artist.id %>" version="0"/>
|
||||
<artist group_name="<%= artist.group_name %>" other_names="<%= artist.other_names %>" urls="<%= artist.urls.map {|x| x.url}.join(" ") %>" is_active="<%= !artist.is_deleted? %>" name="<%= artist.name %>" updater_id="0" id="<%= artist.id %>" version="0"/>
|
||||
<% end %>
|
||||
</artists>
|
||||
|
||||
Reference in New Issue
Block a user