partial fix for #1363 (notice cannot be closed)
This commit is contained in:
@@ -8,7 +8,7 @@ div#page {
|
||||
overflow: visible;
|
||||
margin: 0 30px;
|
||||
|
||||
div#upgrade-account-notice, div#sign-up-notice, div#tos-notice, div#ban-notice {
|
||||
div#upgrade-account-notice, div#sign-up-notice, div#tos-notice, div#ban-notice, div#dmail-notice {
|
||||
margin: 1em 0;
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
|
||||
@@ -193,6 +193,10 @@ class AnonymousUser
|
||||
false
|
||||
end
|
||||
|
||||
def dmail_count
|
||||
""
|
||||
end
|
||||
|
||||
%w(member banned privileged builder platinum contributor janitor moderator admin).each do |name|
|
||||
define_method("is_#{name}?") do
|
||||
false
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
<%= render "users/ban_notice" %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.dmail_count.present? %>
|
||||
<%= render "users/dmail_notice" %>
|
||||
<% end %>
|
||||
|
||||
<% if cookies["accepted_tos"].blank? && !CurrentUser.is_privileged? %>
|
||||
<%= render "users/tos" %>
|
||||
<% end %>
|
||||
|
||||
3
app/views/users/_dmail_notice.html.erb
Normal file
3
app/views/users/_dmail_notice.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="ui-corner-all ui-state-highlight" id="dmail-notice">
|
||||
<h1>You have <%= link_to "unread mail", dmails_path(:search => {:owner_id => CurrentUser.id, :to_id => CurrentUser.id}, :folder => "received") %>.</h1>
|
||||
</div>
|
||||
Reference in New Issue
Block a user