summaryrefslogtreecommitdiff
path: root/app/views/users
diff options
context:
space:
mode:
authorJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-28 14:17:52 +0100
committerJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-28 14:17:52 +0100
commit8aa7de2636dcd22781b623d5c9270f5ecf8b85c2 (patch)
tree1bb5dc36fb28c96ad9be9a2357d380c2c24ee31e /app/views/users
parent39aa7132ceed3d4beab3a9b828e571bbfc67c07e (diff)
parent600574759573e48da9f5f82d4ff8a863b6830c95 (diff)
Merge branch 'develop'5.1-beta2
Diffstat (limited to 'app/views/users')
-rw-r--r--app/views/users/_form_core.html.haml3
-rw-r--r--app/views/users/_index_core.html.haml60
-rw-r--r--app/views/users/show.html.haml28
3 files changed, 57 insertions, 34 deletions
diff --git a/app/views/users/_form_core.html.haml b/app/views/users/_form_core.html.haml
index 24b15f5..980976d 100644
--- a/app/views/users/_form_core.html.haml
+++ b/app/views/users/_form_core.html.haml
@@ -2,7 +2,8 @@
- if GuiFunction.display?('name_data_fields_in_user_edit_form', current_user)
= f.input :male, :collection => [[true, t('users.form.gender.male')], [false, t('users.form.gender.female')]], :label_method => :last, :value_method => :first, :label => t('users.form.male.label'), :hint => conditional_hint('users.form.gender.hint'), :label => t('users.form.gender.label'), :as => :radio_buttons
= f.input :first_name, :label => t('users.form.first_name.label'), :hint => conditional_hint('users.form.first_name.hint'), :autofocus => true
- = f.input :middle_name, :label => t('users.form.middle_name.label'), :hint => conditional_hint('users.form.middle_name.hint')
+ - if User.any?
+ = f.input :middle_name, :label => t('users.form.middle_name.label'), :hint => conditional_hint('users.form.middle_name.hint')
= f.input :last_name, :label => t('users.form.last_name.label'), :hint => conditional_hint('users.form.last_name.hint')
- if GuiFunction.display?('user_name_field_in_user_edit_form', current_user)
= f.input :user_name, :label => t('users.form.user_name.label'), :hint => conditional_hint('users.form.user_name.hint')
diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml
index 7f2251a..9d63afc 100644
--- a/app/views/users/_index_core.html.haml
+++ b/app/views/users/_index_core.html.haml
@@ -1,28 +1,36 @@
- 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{:class => 'table table-striped'}
- %tr
- %th
- %th= t('users.index.user_name')
- %th= t('users.index.email')
- %th= t('users.index.first_name')
- %th= t('users.index.last_name')
- %th{:colspan => '3'}
-
- - for user in users
- - cache(['user_table_row', I18n.locale, current_user, user]) do
- %tr
- %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'
+ %table.table.table-striped
+ %thead
+ %tr
+ %th
+ %th= t('users.index.user_name')
+ %th
+ %span.hidden-phone
+ = t('users.index.email')
+ %th
+ %span.hidden-phone
+ = t('users.index.first_name')
+ %th= t('users.index.last_name')
+
+ %tbody
+ - for user in users
+ - cache(['user_table_row', I18n.locale, current_user, user]) do
+ %tr
+ %td
+ - if user.image?
+ =image_tag(user.image_url(:mini).to_s, :class => 'img-rounded')
- else
- = image_tag 'icons/user-female-16x.png', :class => 'img-rounded'
- %td= user.user_name
- %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
+ - 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
+ - if !user.email.blank?
+ %span.hidden-phone
+ = mail_to user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + user.email)
+ %td
+ %span.hidden-phone
+ = 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
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 4c39fd1..639a52a 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -3,13 +3,27 @@
.row
.span3
- cache(['user_show_aside', I18n.locale, @user, @user.sip_accounts, @user.conferences]) do
- = 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
- %p
- %strong= t('users.show.email') + ":"
- = @user.email
+
+ - if @user.image? && @user.image_url(:profile)
+ %span.hidden-phone
+ %ul.thumbnails
+ %li.span3
+ %div.thumbnail
+ %a.thumbnail{:href => @user.image_url}
+ =image_tag(@user.image_url(:profile), :alt => "Avatar #{@user}", :class => 'img-rounded')
+
+ %table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('users.show.user_name') + ":"
+ %td
+ = truncate(@user.user_name, :length => 14)
+ %tr
+ %td
+ %strong= t('users.show.email') + ":"
+ %td
+ = truncate(@user.email, :length => 14)
%p.controls
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user }