summaryrefslogtreecommitdiff
path: root/users/app/views
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-07-11 11:14:43 -0700
committerjessib <jessib@leap.se>2013-07-11 11:14:43 -0700
commitcc83a756affe1cedd6d828f038632b36e8afe95c (patch)
treebf6d9255ee9709d1504832a61c8918e7ac5cc9bb /users/app/views
parent09b7f01cac6df1ae11f4129b20b781b78a3706ac (diff)
parent02b69c78eed7682c24cb8361da094bdac45a7749 (diff)
Merge branch 'master' into feature/authentication_generic_error
Diffstat (limited to 'users/app/views')
-rw-r--r--users/app/views/overviews/show.html.haml3
-rw-r--r--users/app/views/users/_edit.html.haml14
-rw-r--r--users/app/views/users/edit.html.haml2
-rw-r--r--users/app/views/users/show.html.haml2
4 files changed, 19 insertions, 2 deletions
diff --git a/users/app/views/overviews/show.html.haml b/users/app/views/overviews/show.html.haml
index b8ad814..898cfa0 100644
--- a/users/app/views/overviews/show.html.haml
+++ b/users/app/views/overviews/show.html.haml
@@ -9,6 +9,9 @@
%br
= t(:updated)
= @user.updated_at
+ %br
+ = t(:enabled)
+ = @user.enabled?
%p= t(:overview_intro)
diff --git a/users/app/views/users/_edit.html.haml b/users/app/views/users/_edit.html.haml
index adee8a4..0402f37 100644
--- a/users/app/views/users/_edit.html.haml
+++ b/users/app/views/users/_edit.html.haml
@@ -35,3 +35,17 @@
= link_to user_path(@user), :method => :delete, :confirm => t(:are_you_sure), :class => "btn btn-danger" do
%i.icon-remove.icon-white
= t(:destroy_my_account)
+- if @user != current_user and @user.enabled?
+ %legend
+ = t(:deactivate_account, :username => @user.login)
+ %p= t(:deactivate_description)
+ = link_to deactivate_user_path(@user), :method => :post, :class => "btn btn-warning" do
+ %i.icon-pause.icon-white
+ = t(:deactivate)
+- elsif @user != current_user and !@user.enabled?
+ %legend
+ = t(:enable_account, :username => @user.login)
+ %p= t(:enable_description)
+ = link_to enable_user_path(@user), :method => :post, :class => "btn btn-warning" do
+ %i.icon-ok.icon-white
+ = t(:enable) \ No newline at end of file
diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml
index 08e9dc3..434c025 100644
--- a/users/app/views/users/edit.html.haml
+++ b/users/app/views/users/edit.html.haml
@@ -1 +1 @@
-= render 'edit' \ No newline at end of file
+= render 'edit'
diff --git a/users/app/views/users/show.html.haml b/users/app/views/users/show.html.haml
index 08e9dc3..434c025 100644
--- a/users/app/views/users/show.html.haml
+++ b/users/app/views/users/show.html.haml
@@ -1 +1 @@
-= render 'edit' \ No newline at end of file
+= render 'edit'