diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c0e04db..6d04dcc 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -248,12 +248,17 @@ module ApplicationHelper
end
def button(type, label, url, html_options = {})
- the_class = "button with-text icon-#{type}"
+ button_without_text type, label, url, html_options.merge(:class=>'with-text')
+ end
+
+ def button_without_text(type, label, url, html_options = {})
+ the_class = "button icon-#{type}"
if html_options.has_key?(:class)
the_class << ' ' << html_options[:class]
end
link_to(content_tag('span', label), url, html_options.merge(:class => the_class ))
end
+ alias icon_button button_without_text
def submit_button(type, label, html_options = {})
bt_cancel = html_options[:cancel] ? button(:cancel, _('Cancel'), html_options[:cancel]) : ''
diff --git a/app/views/content_viewer/_comment.rhtml b/app/views/content_viewer/_comment.rhtml
index f5f7012..48615c5 100644
--- a/app/views/content_viewer/_comment.rhtml
+++ b/app/views/content_viewer/_comment.rhtml
@@ -1,7 +1,7 @@
- <% if user == @page.profile || user == comment.author %>
+ <% if logged_in? && (user == @page.profile || user == comment.author) %>
<% button_bar(:style => 'float: right; margin-top: 0;') do %>
- <%= button(:delete, 'Delete', { :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %>
+ <%= icon_button(:delete, 'Delete', { :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %>
<% end %>
<% end %>
diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml
index e299efd..4cd530f 100644
--- a/app/views/layouts/application.rhtml
+++ b/app/views/layouts/application.rhtml
@@ -56,9 +56,13 @@
<% unless flash[:notice].nil? %>
-
+
<%= flash[:notice] %>
- <%= javascript_tag(visual_effect(:fade, "notice", :duration => 15)) %>
+ <%= javascript_tag(
+ visual_effect( :appear, 'notice', :duration => 2, :queue => :end ) +
+ visual_effect( :highlight, 'notice', :duration => 3, :queue => :end ) +
+ visual_effect( :fade, 'notice', :duration => 2, :queue => :end )
+ ) %>
<% end %>
--
libgit2 0.21.2