From f09e15992fcb92b678b1a06e19801d93a306045c Mon Sep 17 00:00:00 2001
From: Valery Sizov <vsv2711@gmail.com>
Date: Sun, 18 Dec 2011 18:09:59 +0200
Subject: [PATCH] fix show token in profile

---
 app/views/profile/password.html.haml | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/views/profile/password.html.haml b/app/views/profile/password.html.haml
index 18bae4b6af0..0fd20ce2dba 100644
--- a/app/views/profile/password.html.haml
+++ b/app/views/profile/password.html.haml
@@ -25,9 +25,16 @@
 = form_for @user, :url => profile_reset_private_token_path, :method => :put do |f|
   %p
     Current private token:
-    %strong
-      = current_user.private_token
-    %em.cred
-      keep it in secret!
+    - if current_user.private_token
+      %strong
+        = current_user.private_token
+      %em.cred
+        keep it in secret!
+    - else
+      %strong don`t have
   .actions
-    = f.submit 'Reset', :confirm => "Are you sure?", :class => "grey-button"
+    - if current_user.private_token
+      = f.submit 'Reset', :confirm => "Are you sure?", :class => "grey-button"
+    - else
+      = f.submit 'Generate', :class => "grey-button"
+
-- 
GitLab