Skip to content

Commit

Permalink
hide more actions menu when user is signed out
Browse files Browse the repository at this point in the history
  • Loading branch information
patcito committed Jul 13, 2012
1 parent 24f7664 commit 84cc75a
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions app/views/questions/_toolbar.html.haml
Expand Up @@ -66,37 +66,37 @@
= link_to t('scaffold.edit'), edit_question_close_request_path(@question,@close_request), :id => "edit_question_close_request_link", :rel => 'nofollow', "data-lazy" => "1"
= link_to t('close_requests.form.retract'), question_close_request_path(@question,@close_request), :id => "destroy_question_close_request_link", :rel => 'nofollow', :confirm => t('scaffold.are_you_sure'), :method => :delete

- if logged_in?
%li.more.current.action
= link_to t("#{i18n_scope}.more_actions"), "#"

%li.more.current.action
= link_to t("#{i18n_scope}.more_actions"), "#"

%ul.drop-menu
- if logged_in?
- if show_close_request_form && @close_request.new_record?
%li.spam
= link_to t("#{i18n_scope}.request_closing"), @close_request.new_record? ? new_question_close_request_path(@question) : edit_question_close_request_path(@question, @close_request), :id => "request-close-link", :class => "show_form", "data-lazy" => "1", :rel => 'nofollow', :title => t("#{i18n_scope}.request_closing_details")

- if @question.wiki && current_user.can_edit_wiki_post_on?(@question.group) || current_user.can_edit_others_posts_on?(@question.group) || current_user.can_modify?(@question)
%li.edit-q
= link_to t('scaffold.edit'), edit_question_path(@question)

- if (current_user.can_modify?(@question) || current_user.owner_of?(@question.group))
%li.delete-q
= link_to t("scaffold.destroy"), question_path(@question), :confirm => t('scaffold.are_you_sure'), :method => :delete

- if show_open_request_form
-if !@open_request.new_record?
%li.open
= "#{t('#{i18n_scope}.requested_reopening')} #{@open_request.comment}"
= link_to t("#{i18n_scope}.edit_request"), edit_question_open_request_path(@question, @open_request), :id => "edit_question_open_request_link", :rel => 'nofollow'
= link_to t("#{i18n_scope}.retract_request"), question_open_request_path(@question,@open_request), :id => "destroy_question_open_request_link", :rel => 'nofollow', :confirm => t('scaffold.are_you_sure'), :method => :delete
- else
%li.open
= link_to t("#{i18n_scope}.request_opening"), new_question_open_request_path(@question), :id => "request-open-link", :rel => 'nofollow', :title => t("#{i18n_scope}.request_opening_details")

- if current_user.can_modify?(@question) || current_user.owner_of?(@question.group)
%li.delete
= link_to t("scaffold.destroy"), question_path(@question.id), :confirm => t('scaffold.are_you_sure'), :method => :delete
%ul.drop-menu
- if logged_in?
- if show_close_request_form && @close_request.new_record?
%li.spam
= link_to t("#{i18n_scope}.request_closing"), @close_request.new_record? ? new_question_close_request_path(@question) : edit_question_close_request_path(@question, @close_request), :id => "request-close-link", :class => "show_form", "data-lazy" => "1", :rel => 'nofollow', :title => t("#{i18n_scope}.request_closing_details")

- if @question.wiki && current_user.can_edit_wiki_post_on?(@question.group) || current_user.can_edit_others_posts_on?(@question.group) || current_user.can_modify?(@question)
%li.edit-q
= link_to t('scaffold.edit'), edit_question_path(@question)

- if (current_user.can_modify?(@question) || current_user.owner_of?(@question.group))
%li.delete-q
= link_to t("scaffold.destroy"), question_path(@question), :confirm => t('scaffold.are_you_sure'), :method => :delete

- if show_open_request_form
-if !@open_request.new_record?
%li.open
= "#{t('#{i18n_scope}.requested_reopening')} #{@open_request.comment}"
= link_to t("#{i18n_scope}.edit_request"), edit_question_open_request_path(@question, @open_request), :id => "edit_question_open_request_link", :rel => 'nofollow'
= link_to t("#{i18n_scope}.retract_request"), question_open_request_path(@question,@open_request), :id => "destroy_question_open_request_link", :rel => 'nofollow', :confirm => t('scaffold.are_you_sure'), :method => :delete
- else
%li.open
= link_to t("#{i18n_scope}.request_opening"), new_question_open_request_path(@question), :id => "request-open-link", :rel => 'nofollow', :title => t("#{i18n_scope}.request_opening_details")

- if current_user.can_modify?(@question) || current_user.owner_of?(@question.group)
%li.delete
= link_to t("scaffold.destroy"), question_path(@question.id), :confirm => t('scaffold.are_you_sure'), :method => :delete


#panel-forms.clearfix
Expand Down

0 comments on commit 84cc75a

Please sign in to comment.