Fix error when accessing a tag page without being signed in.

This commit is contained in:
Andrej Kacian 2011-08-14 23:51:53 +02:00
parent 4fe61892e1
commit 657a9f96ef

View file

@ -2,18 +2,19 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%ul.left_nav
%li
%div.root_element
= t('aspects.index.tags_following')
%ul.sub_nav
- if current_user.followed_tags.size > 0
- for tg in current_user.followed_tags
%li.unfollow{:id => tg.name}
.unfollow_icon.hidden
= link_to image_tag("icons/monotone_close_exit_delete.png", :height => 16, :title => t('aspects.index.unfollow_tag', :tag => tg.name)), tag_tag_followings_path(:name => tg.name, :remote => true), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :id => "unfollow_" + tg.name
=link_to "##{tg.name}", tag_path(:name => tg.name), :class => "tag_selector"
- else
%li
= link_to t('aspects.index.no_tags'), tags_path, :class => "new_aspect"
- if user_signed_in?
%ul.left_nav
%li
%div.root_element
= t('aspects.index.tags_following')
%ul.sub_nav
- if current_user.followed_tags.size > 0
- for tg in current_user.followed_tags
%li.unfollow{:id => tg.name}
.unfollow_icon.hidden
= link_to image_tag("icons/monotone_close_exit_delete.png", :height => 16, :title => t('aspects.index.unfollow_tag', :tag => tg.name)), tag_tag_followings_path(:name => tg.name, :remote => true), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :id => "unfollow_" + tg.name
=link_to "##{tg.name}", tag_path(:name => tg.name), :class => "tag_selector"
- else
%li
= link_to t('aspects.index.no_tags'), tags_path, :class => "new_aspect"