fixed tag category coloring, fixed tag category expiration when updating, work on migration
This commit is contained in:
@@ -20,6 +20,18 @@ article.post-preview.blacklisted-active {
|
||||
}
|
||||
|
||||
div#c-posts {
|
||||
li.category-1 a {
|
||||
color: #A00;
|
||||
}
|
||||
|
||||
li.category-3 a {
|
||||
color: #A0A;
|
||||
}
|
||||
|
||||
li.category-4 a {
|
||||
color: #0A0;
|
||||
}
|
||||
|
||||
span.post-count {
|
||||
color: #CCC;
|
||||
margin-left: 0.2em;
|
||||
|
||||
@@ -66,7 +66,7 @@ class Tag < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def update_category_cache
|
||||
Cache.put("tc:#{Cache.sanitize(name)}", category)
|
||||
Cache.put("tc:#{Cache.sanitize(name)}", category, 1.hour)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -95,6 +95,7 @@ class Tag < ActiveRecord::Base
|
||||
|
||||
if tag
|
||||
if category > 0
|
||||
tag.update_category_cache
|
||||
tag.update_column(:category, category)
|
||||
end
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ private
|
||||
|
||||
def build_list_item(tag, template, options)
|
||||
html = ""
|
||||
html << %{<li data-tag-type="#{categories[tag]}" data-tag-name="#{u(tag)}">}
|
||||
html << %{<li class="category-#{categories[tag]}">}
|
||||
|
||||
if CurrentUser.user.is_privileged?
|
||||
html << %{<a href="/wiki_pages?title=#{u(tag)}">?</a> }
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
/login
|
||||
/sign in
|
||||
<% end %>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
@@ -1,11 +1,9 @@
|
||||
<div id="c-users">
|
||||
<div id="a-edit">
|
||||
<h1>Edit Settings</h1>
|
||||
<h1>Settings</h1>
|
||||
|
||||
<%= simple_form_for @user do |f| %>
|
||||
<fieldset>
|
||||
<legend>Basic</legend>
|
||||
|
||||
<%= f.input :email, :required => Danbooru.config.enable_email_verification?, :hint => "Your email address (used for messages and for password resets)" %>
|
||||
<%= f.input :time_zone, :hint => "Your local time zone" %>
|
||||
<%= f.input :receive_email_notifications, :hint => "Enable to receive email notification when you receive a DMail" %>
|
||||
@@ -17,8 +15,6 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Password</legend>
|
||||
|
||||
<%= f.input :password, :hint => "What you want your new password to be (leave blank if you don't want to change your password)", :label => "New password", :input_html => {:autocomplete => "off"} %>
|
||||
<%= f.input :old_password, :hint => "Your old password (you must enter your password if updating your name or password)", :as => :password, :input_html => {:autocomplete => "off"} %>
|
||||
</fieldset>
|
||||
@@ -29,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
/Users/<%= @user.name %>/Settings
|
||||
/settings
|
||||
<% end %>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-users">
|
||||
<div id="a-show">
|
||||
<h1>Show User: <%= @presenter.name %></h1>
|
||||
<h1><%= @presenter.name %></h1>
|
||||
|
||||
<dl>
|
||||
<dt>Join Date</dt>
|
||||
|
||||
Reference in New Issue
Block a user