From f0ab616d674d7c7e9d0018ba7a9fde7107b0519f Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 12 Apr 2013 11:52:13 +0200 Subject: files view added --- app/views/users/_generic_files.html.haml | 7 +++++++ app/views/users/show.html.haml | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 app/views/users/_generic_files.html.haml (limited to 'app/views/users') 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/show.html.haml b/app/views/users/show.html.haml index 98f7cc6..9bf76df 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -89,4 +89,7 @@ = 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 -- cgit v1.2.3 From e1462c8f4159e332b729819281fca7c2937e49eb Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 16 Apr 2013 13:02:18 +0200 Subject: voicemail settigs disabled --- app/views/users/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 9bf76df..8421c40 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -47,8 +47,8 @@ =link_to t("voicemail_messages.index.page_title"), sip_account_voicemail_messages_path(sip_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("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 -- cgit v1.2.3 From 75bc8af34e4ea625725206f015b04730fad8de63 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:21:29 +0200 Subject: list voicemail accounts in user view --- app/views/users/_voicemail_accounts.html.haml | 7 +++++++ app/views/users/show.html.haml | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 app/views/users/_voicemail_accounts.html.haml (limited to 'app/views/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 8421c40..697604a 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -43,12 +43,11 @@ %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 @@ -85,6 +84,9 @@ - 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} -- cgit v1.2.3 From 165d746547658d63ad80ed6a7c781629c29be5ea Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 15:11:16 +0200 Subject: pagination and sorting added --- app/views/users/_index_core.html.haml | 10 ++++++---- 1 file changed, 6 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 9d63afc..c994997 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,16 +1,18 @@ - cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do + .pagination + = will_paginate users, :renderer => BootstrapPagination::Rails %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 -- cgit v1.2.3 From 92fd1b2e6611aaf0910b9c5a80908e9160559bcc Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 29 Apr 2013 15:25:06 +0200 Subject: omit pagination for embedded views --- app/views/users/_index_core.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views/users') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index c994997..d741282 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,6 +1,7 @@ - cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do .pagination - = will_paginate users, :renderer => BootstrapPagination::Rails + - if defined?(users.total_pages) + = will_paginate users, :renderer => BootstrapPagination::Rails %table.table.table-striped %thead %tr -- cgit v1.2.3 From 5525a9af9229f0ac65d44472519aac4ab8751018 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 2 May 2013 10:50:53 +0200 Subject: pagination --- app/views/users/_index_core.html.haml | 7 ++++--- 1 file changed, 4 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 d741282..78510a2 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,7 +1,8 @@ - cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do - .pagination - - if defined?(users.total_pages) - = will_paginate users, :renderer => BootstrapPagination::Rails + + - if defined?(users.total_pages) + = will_paginate users, :renderer => BootstrapPagination::Rails, :previous_label => raw(''), :next_label => raw('') + %table.table.table-striped %thead %tr -- cgit v1.2.3 From ef07898499292b72ce011bc9f3494cb4dade1d6b Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 13 May 2013 09:34:30 +0200 Subject: cache pagination and sortation --- app/views/users/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/users') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 78510a2..7038457 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,4 +1,4 @@ -- 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(''), :next_label => raw('') -- cgit v1.2.3