[logaling-commit] logaling/logaling-server [apply-design] Show term operation panel only if signed in

Zurück zum Archiv-Index

SHIMADA Koji null+****@clear*****
Thu Sep 27 01:16:40 JST 2012


SHIMADA Koji	2012-09-27 01:16:40 +0900 (Thu, 27 Sep 2012)

  New Revision: 1835ea7e57ac125b7f4368ac4d38fda3708a5228
  https://github.com/logaling/logaling-server/commit/1835ea7e57ac125b7f4368ac4d38fda3708a5228

  Log:
    Show term operation panel only if signed in

  Modified files:
    app/views/shared/_term.html.haml

  Modified: app/views/shared/_term.html.haml (+6 -5)
===================================================================
--- app/views/shared/_term.html.haml    2012-09-27 00:24:21 +0900 (32f6278)
+++ app/views/shared/_term.html.haml    2012-09-27 01:16:40 +0900 (aa6ff34)
@@ -16,11 +16,12 @@
         %p.githubProject
           = link_to term.glossary_name_without_github, '#'
       - else
-        - user_glossary = UserGlossary.find_by_term_and_user(term, current_user)
         %p.logalingProject
           = link_to term.glossary_name, '#'
-        - if user_glossary
-          %p.btn-group.actions
-            = link_to raw("<i class=icon-pencil></i>"), edit_user_glossary_term_path(current_user, user_glossary, term.id), :class => 'btn btn-mini'
-            = link_to raw("<i class=icon-trash></i>"), user_glossary_term_path(current_user, user_glossary, term.id), method: :delete, :class => 'btn btn-mini'
+          - if signed_in?
+            - user_glossary = UserGlossary.find_by_term_and_user(term, current_user)
+            - if user_glossary
+              %p.btn-group.actions
+                = link_to raw("<i class=icon-pencil></i>"), edit_user_glossary_term_path(current_user, user_glossary, term.id), :class => 'btn btn-mini'
+                = link_to raw("<i class=icon-trash></i>"), user_glossary_term_path(current_user, user_glossary, term.id), method: :delete, :class => 'btn btn-mini'
 
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Zurück zum Archiv-Index