From 18ed88c7e3c789366f6e5443dc4ee0bc981a4b88 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 20:18:16 +0100 Subject: Started the migration to Twitter Bootstrap. --- app/views/users/_index_core.html.haml | 2 +- app/views/users/edit.html.haml | 2 +- app/views/users/index.html.haml | 2 +- app/views/users/new.html.haml | 2 +- app/views/users/show.html.haml | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 5f0cb41..b364bd2 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,5 +1,5 @@ - cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do - %table + %table{:class => 'table table-striped'} %tr %th %th= t('users.index.user_name') diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 96272f5..ed79b2c 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -1,3 +1,3 @@ -- title t("users.edit.page_title", :resource => @user) +- content_for :title, t("users.edit.page_title", :resource => @user) = render "form" diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 892e035..8a3d1fc 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,4 +1,4 @@ -- title t("users.index.page_title") +- content_for :title, t("users.index.page_title") - if @users.count > 0 = render "index_core", :users => @users diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml index a014611..64fe55f 100644 --- a/app/views/users/new.html.haml +++ b/app/views/users/new.html.haml @@ -1,3 +1,3 @@ -- title t("users.new.page_title") +- content_for :title, t("users.new.page_title") = render "form" diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 9a0ae02..75eaf54 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,7 +1,7 @@ -- title "User: #{@user}" +- content_for :title, "User: #{@user}" -#user-show - %aside +.row + .span3 - cache(['user_show_aside', I18n.locale, @user, @user.sip_accounts, @user.conferences]) do = image_tag @user.image_url(:small).to_s, class: 'display' if @user.image? && @user.image_url(:small) %p @@ -40,7 +40,7 @@ =link_to conference, edit_user_conference_path(@user, conference) - %section + .span9 = render :partial => 'phone_books', :locals => {:user => @user, :phone_books => @phone_books} - if current_user.user_groups.where(:name => 'Admins').any? -- cgit v1.2.3 From d8fe3b636cab1504cb5d3cb5dc57ed818749ccf5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 21:30:48 +0100 Subject: Twitter Bootstrap stuff. --- app/views/users/_index_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index b364bd2..b492a1d 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -7,9 +7,9 @@ %th= t('users.index.first_name') %th= t('users.index.last_name') - - reset_cycle + - for user in users - %tr{:class => cycle('odd', 'even')} + %tr - cache(['user_table_row_inner_td', I18n.locale, current_user, user]) do %td = image_tag user.image_url(:mini).to_s if user.image_url(:mini) -- cgit v1.2.3 From c52babd4346b1a52c28bb7437d0434ecfb9ab70f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 22:25:32 +0100 Subject: Twitter Bootstrap stuff. --- app/views/users/_index_core.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index b492a1d..b0efaef 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -6,11 +6,11 @@ %th= t('users.index.email') %th= t('users.index.first_name') %th= t('users.index.last_name') - - + %th{:colspan => '3'} + - for user in users - %tr - - cache(['user_table_row_inner_td', I18n.locale, current_user, user]) do + - cache(['user_table_row', I18n.locale, current_user, user]) do + %tr %td = image_tag user.image_url(:mini).to_s if user.image_url(:mini) %td= user.user_name -- cgit v1.2.3 From 25f7eec8c93630650c2b5f980712261a14b00def Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 23:44:19 +0100 Subject: Avatar --- app/views/users/_index_core.html.haml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index b0efaef..7f2251a 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -11,10 +11,18 @@ - for user in users - cache(['user_table_row', I18n.locale, current_user, user]) do %tr - %td - = image_tag user.image_url(:mini).to_s if user.image_url(:mini) + %td + - if user.image? + =image_tag(user.image_url(:mini).to_s, :class => 'img-rounded') + - else + - if user.male? + = image_tag 'icons/user-male-16x.png', :class => 'img-rounded' + - else + = image_tag 'icons/user-female-16x.png', :class => 'img-rounded' %td= user.user_name - %td= user.email + %td + - if !user.email.blank? + = mail_to user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + user.email) %td= user.first_name %td= user.last_name =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => user} \ No newline at end of file -- cgit v1.2.3 From f8bc860750f06ab95f9ced8e919e846d3e589819 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 00:02:03 +0100 Subject: Icons --- app/views/users/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/users') diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 75eaf54..4c39fd1 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -3,7 +3,7 @@ .row .span3 - cache(['user_show_aside', I18n.locale, @user, @user.sip_accounts, @user.conferences]) do - = image_tag @user.image_url(:small).to_s, class: 'display' if @user.image? && @user.image_url(:small) + = image_tag @user.image_url(:small).to_s, :class => 'img-rounded' if @user.image? && @user.image_url(:small) %p %strong= t('users.show.user_name') + ":" = @user.user_name -- cgit v1.2.3