layout tweaks
This commit is contained in:
@@ -116,7 +116,7 @@ module ApplicationHelper
|
||||
protected
|
||||
def nav_link_match(controller, url)
|
||||
url =~ case controller
|
||||
when "sessions", "users", "maintenance/user/login_reminders", "maintenance/user/password_resets", "admin/users"
|
||||
when "sessions", "users", "maintenance/user/login_reminders", "maintenance/user/password_resets", "admin/users", "tag_subscriptions"
|
||||
/^\/(session|users)/
|
||||
|
||||
when "forum_posts"
|
||||
@@ -128,7 +128,7 @@ protected
|
||||
when "notes", "note_versions"
|
||||
/^\/notes/
|
||||
|
||||
when "posts", "uploads", "post_versions", "explore/posts", "moderator/post/dashboards", "favorites", "tag_subscriptions"
|
||||
when "posts", "uploads", "post_versions", "explore/posts", "moderator/post/dashboards", "favorites"
|
||||
/^\/post/
|
||||
|
||||
when "artists", "artist_versions"
|
||||
|
||||
@@ -42,6 +42,10 @@ class UserPresenter
|
||||
end
|
||||
|
||||
def upload_limit
|
||||
if user.is_contributor?
|
||||
return "none"
|
||||
end
|
||||
|
||||
deleted_count = Post.for_user(user.id).deleted.count
|
||||
pending_count = Post.for_user(user.id).pending.count
|
||||
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", user.id).count
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if @post_set.is_tag_subscription? %>
|
||||
<li><%= link_to "Edit tag subscription", tag_subscriptions_path %></li>
|
||||
<li><%= link_to "Edit subscriptions", tag_subscriptions_path %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
<li>|</li>
|
||||
<% if @user.id == CurrentUser.id %>
|
||||
<li><%= link_to "Settings", edit_user_path(CurrentUser.user) %></li>
|
||||
<% if @user.is_privileged? %>
|
||||
<li><%= link_to "Edit subscriptions", tag_subscriptions_path %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "Profile", user_path(CurrentUser.user) %></li>
|
||||
<li><%= link_to "Messages #{CurrentUser.dmail_count}", dmails_path(:search => {:owner_id => CurrentUser.id, :to_id => CurrentUser.id}) %></li>
|
||||
<% else %>
|
||||
|
||||
Reference in New Issue
Block a user