diff options
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/_generic_files.html.haml | 7 | ||||
-rw-r--r-- | app/views/users/_index_core.html.haml | 14 | ||||
-rw-r--r-- | app/views/users/_voicemail_accounts.html.haml | 7 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 15 |
4 files changed, 33 insertions, 10 deletions
diff --git a/app/views/users/_generic_files.html.haml b/app/views/users/_generic_files.html.haml new file mode 100644 index 0000000..15bdb74 --- /dev/null +++ b/app/views/users/_generic_files.html.haml @@ -0,0 +1,7 @@ +-# Files +-# +- if (can?( :index, GenericFile ) && user.generic_files.count > 0 ) || can?( :create, GenericFile ) + %h2= t('generic_files.index.page_title') + - if can?( :index, GenericFile ) && user.generic_files.count > 0 + = render "generic_files/index_core", :generic_files => user.generic_files + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => GenericFile}
\ No newline at end of file diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 9d63afc..7038457 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,16 +1,20 @@ -- cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do +- cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.first, users.last, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do + + - if defined?(users.total_pages) + = will_paginate users, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>') + %table.table.table-striped %thead %tr %th - %th= t('users.index.user_name') + %th= sortable :user_name, t('users.index.user_name') %th %span.hidden-phone - = t('users.index.email') + = sortable :email, t('users.index.email') %th %span.hidden-phone - = t('users.index.first_name') - %th= t('users.index.last_name') + = sortable :first_name, t('users.index.first_name') + %th= sortable :last_name, t('users.index.last_name') %tbody - for user in users diff --git a/app/views/users/_voicemail_accounts.html.haml b/app/views/users/_voicemail_accounts.html.haml new file mode 100644 index 0000000..4410b09 --- /dev/null +++ b/app/views/users/_voicemail_accounts.html.haml @@ -0,0 +1,7 @@ +-# VoicemailAccount +-# +- if (can?( :index, VoicemailAccount ) && user.voicemail_accounts.count > 0 ) || can?( :create, VoicemailAccount ) + %h2= t('voicemail_accounts.index.page_title') + - if can?( :index, VoicemailAccount ) && user.voicemail_accounts.count > 0 + = render "voicemail_accounts/index_core", {:voicemail_accounts => user.voicemail_accounts, :voicemail_accountable => user} + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => VoicemailAccount}
\ No newline at end of file diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 98f7cc6..697604a 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -43,13 +43,12 @@ %strong ... %p =link_to t("call_histories.index.page_title"), sip_account_call_histories_path(sip_account) - %br - =link_to t("voicemail_messages.index.page_title"), sip_account_voicemail_messages_path(sip_account) + - if ! sip_account.voicemail_account.blank? + %br + =link_to t("voicemail_messages.index.page_title"), voicemail_account_voicemail_messages_path(sip_account.voicemail_account) %br =link_to t("call_forwards.index.page_title"), sip_account_call_forwards_path(sip_account) %br - =link_to t("voicemail_settings.index.page_title"), sip_account_voicemail_settings_path(sip_account) - %br =link_to t("softkeys.index.page_title"), sip_account_softkeys_path(sip_account) %br =link_to t("ringtones.show.page_title"), sip_account_ringtones_path(sip_account) @@ -85,8 +84,14 @@ - cache(['user_show_fax_accounts_overview', I18n.locale, @user, @user.fax_accounts]) do = render :partial => 'fax_accounts', :locals => {:user => @user} + - cache(['user_show_voicemail_accounts_overview', I18n.locale, @user, @user.voicemail_accounts]) do + = render :partial => 'voicemail_accounts', :locals => {:user => @user} + - cache(['user_show_conferences_overview', I18n.locale, @user, @user.conferences]) do = render :partial => 'conferences', :locals => {:user => @user} - cache(['user_switchboards_overview', I18n.locale, @user, @user.switchboards]) do - = render :partial => 'switchboards', :locals => {:user => @user}
\ No newline at end of file + = render :partial => 'switchboards', :locals => {:user => @user} + + - cache(['user_show_generic_files_overview', I18n.locale, @user, @user.generic_files]) do + = render :partial => 'generic_files', :locals => {:user => @user}
\ No newline at end of file |