From 75fb68c4d1eb647a268890c080da2dc3875c0e77 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 29 Jan 2013 16:44:47 +0100 Subject: Get rid of @current_user. The use of current_user is better. --- app/views/phone_numbers/_form_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/phone_numbers/_form_core.html.haml b/app/views/phone_numbers/_form_core.html.haml index a1ce1f3..a0a69db 100644 --- a/app/views/phone_numbers/_form_core.html.haml +++ b/app/views/phone_numbers/_form_core.html.haml @@ -4,7 +4,7 @@ = f.input :name, :collection => ['Office', 'Home', 'Mobile', 'Fax'], :include_blank => false, :label => t('phone_numbers.form.name.label'), :hint => conditional_hint('phone_numbers.form.name.hint') = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :autofocus => true - else - - if @callthrough || @hunt_group_member || @access_authorization || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count == 0 || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count > 250 + - if @callthrough || @hunt_group_member || @access_authorization || current_user.current_tenant.array_of_available_internal_extensions_and_dids.count == 0 || current_user.current_tenant.array_of_available_internal_extensions_and_dids.count > 250 = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :autofocus => true - else - = f.input :number, :collection => @current_user.current_tenant.array_of_available_internal_extensions_and_dids, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :include_blank => false, :autofocus => true + = f.input :number, :collection => current_user.current_tenant.array_of_available_internal_extensions_and_dids, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :include_blank => false, :autofocus => true -- cgit v1.2.3 From 5d84248cf177635a19f033f53abbca87ac5c87bc Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 29 Jan 2013 18:55:07 +0100 Subject: Fixed hidden-phone bug. --- .../shared/_index_view_edit_destroy_part.html.haml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/shared/_index_view_edit_destroy_part.html.haml b/app/views/shared/_index_view_edit_destroy_part.html.haml index 6bb1e7b..d396460 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -4,17 +4,20 @@ - if can? :show, child %a.btn.btn-small.btn-success{:href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) } %i.icon-info-sign.icon-white - =t("#{child.class.name.underscore.pluralize}.index.actions.show") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child %a.btn.btn-small.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) } %i.icon-edit.icon-white - =t("#{child.class.name.underscore.pluralize}.index.actions.edit") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"} %i.icon-remove.icon-white - =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? %td @@ -22,15 +25,18 @@ - if can? :show, child %a.btn.btn-small.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) } %i.icon-info-sign.icon-white - =t("#{child.class.name.underscore.pluralize}.index.actions.show") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child %a.btn.btn-small.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } %i.icon-edit.icon-white - =t("#{child.class.name.underscore.pluralize}.index.actions.edit") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"} %i.icon-trash.icon-white - =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file -- cgit v1.2.3 From d4a664a0495bd183b16a239aeb4c342e1ca739fa Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 30 Jan 2013 15:59:52 +0100 Subject: select route endpoint --- app/views/call_routes/_form_core.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/call_routes/_form_core.html.haml b/app/views/call_routes/_form_core.html.haml index b64d660..6679a7b 100644 --- a/app/views/call_routes/_form_core.html.haml +++ b/app/views/call_routes/_form_core.html.haml @@ -1,5 +1,4 @@ .inputs = f.input :routing_table, :collection => CallRoute::ROUTING_TABLES, :label => t('call_routes.form.table.label'), :hint => conditional_hint('call_routes.form.table.hint'), :include_blank => false, :autofocus => true = f.input :name, :label => t('call_routes.form.name.label'), :hint => conditional_hint('call_routes.form.name.hint') - = f.input :endpoint_type, :label => t('call_routes.form.endpoint_type.label'), :hint => conditional_hint('call_routes.form.endpoint_type.hint') - = f.input :endpoint_id, :label => t('call_routes.form.endpoint_id.label'), :hint => conditional_hint('call_routes.form.endpoint_id.hint') + = f.input :endpoint_str, :collection => @endpoints, :label => t('call_routes.form.endpoint.label'), :hint => conditional_hint('call_routes.form.endpoint.hint'), :include_blank => false -- cgit v1.2.3 From 8da882cf3ec53f9057b17bd8dd39c2eadb2a88c2 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 31 Jan 2013 11:39:25 +0100 Subject: Fixed single sign on. #145 --- app/views/layouts/_navbar.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index c2d9946..9350de0 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -48,7 +48,8 @@ %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} = current_user - %li - %a.navbar-link{:href => log_out_path} - %i.icon-off.icon-white + - if single_sign_on_system? == false + %li + %a.navbar-link{:href => log_out_path} + %i.icon-off.icon-white -- cgit v1.2.3 From c744a4aca7b45a654d842c1b41aeabf86a406f62 Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Thu, 31 Jan 2013 20:14:42 +0100 Subject: Better transfer behaviour --- app/views/config_snom/show.xml.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml index 5f53802..30bee56 100644 --- a/app/views/config_snom/show.xml.haml +++ b/app/views/config_snom/show.xml.haml @@ -40,7 +40,11 @@ %mwi_notification{:perm => 'RW'}= 'silent' %mwi_dialtone{:perm => 'RW'}= 'normal' %prefer_saved_over_received_photo{:perm => 'RW'}= 'off' - %no_dnd{:perm => 'RW'}= 'on' + %no_dnd{:perm => 'RW'}= 'off' + %transfer_on_hangup{:perm => 'RW'}= 'on' + %transfer_on_hangup_non_pots{:perm => 'RW'}= 'on' + %call_join_xfer{:perm => 'RW'}= 'on' + %conf_hangup{:perm => 'RW'}= 'on' %logon_wizard{:perm => 'RW'}= 'off' %disable_deflection{:perm => 'RW'}= 'off' %csta_control{:perm => 'RW'}= 'on' -- cgit v1.2.3 From 4acda4279f11dc917b43aa7505ecb07d2161f0f6 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 1 Feb 2013 08:11:16 +0100 Subject: position added --- app/views/call_routes/_form_core.html.haml | 1 + app/views/call_routes/_index_core.html.haml | 2 ++ app/views/call_routes/show.html.haml | 3 +++ 3 files changed, 6 insertions(+) (limited to 'app/views') diff --git a/app/views/call_routes/_form_core.html.haml b/app/views/call_routes/_form_core.html.haml index 6679a7b..926c985 100644 --- a/app/views/call_routes/_form_core.html.haml +++ b/app/views/call_routes/_form_core.html.haml @@ -2,3 +2,4 @@ = f.input :routing_table, :collection => CallRoute::ROUTING_TABLES, :label => t('call_routes.form.table.label'), :hint => conditional_hint('call_routes.form.table.hint'), :include_blank => false, :autofocus => true = f.input :name, :label => t('call_routes.form.name.label'), :hint => conditional_hint('call_routes.form.name.hint') = f.input :endpoint_str, :collection => @endpoints, :label => t('call_routes.form.endpoint.label'), :hint => conditional_hint('call_routes.form.endpoint.hint'), :include_blank => false + = f.input :position, :label => t('call_routes.form.position.label'), :hint => conditional_hint('call_routes.form.position.hint') \ No newline at end of file diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index f0acebb..52a45ba 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -2,6 +2,7 @@ %table.table.table-striped %thead %tr + %th %th= t('call_routes.index.name') %th= t('route_elements.index.pattern') %th= t('call_routes.index.endpoint') @@ -10,6 +11,7 @@ - for call_route in call_routes - cache(['call_route_single_table_row', call_route, call_routes.count]) do %tr + %td= call_route.position %td= call_route.name %td - if call_route.route_elements.any? diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml index 09daf53..a33a29b 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -1,5 +1,8 @@ - content_for :title, t("call_routes.show.page_title") +%p + %strong= t('call_routes.show.position') + ":" + = @call_route.position %p %strong= t('call_routes.show.table') + ":" = @call_route.routing_table -- cgit v1.2.3 From f46bfd1618f85842913dd967133f111ec2628fef Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 1 Feb 2013 09:13:30 +0100 Subject: position added --- app/views/route_elements/_form_core.html.haml | 1 + app/views/route_elements/_index_core.html.haml | 2 ++ app/views/route_elements/show.html.haml | 3 +++ 3 files changed, 6 insertions(+) (limited to 'app/views') diff --git a/app/views/route_elements/_form_core.html.haml b/app/views/route_elements/_form_core.html.haml index a9a38a7..d22467e 100644 --- a/app/views/route_elements/_form_core.html.haml +++ b/app/views/route_elements/_form_core.html.haml @@ -4,4 +4,5 @@ = f.input :pattern, :label => t('route_elements.form.pattern.label'), :hint => conditional_hint('route_elements.form.pattern.hint') = f.input :replacement, :label => t('route_elements.form.replacement.label'), :hint => conditional_hint('route_elements.form.replacement.hint') = f.input :action, :collection => RouteElement::ELEMENT_ACTIONS, :label => t('route_elements.form.action.label'), :hint => conditional_hint('route_elements.form.action.hint'), :include_blank => false + = f.input :position, :label => t('route_elements.form.position.label'), :hint => conditional_hint('route_elements.form.position.hint') = f.input :mandatory, :label => t('route_elements.form.mandatory.label'), :hint => conditional_hint('route_elements.form.mandatory.hint') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index 37c0656..f68a9ba 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -1,6 +1,7 @@ %table.table.table-striped %thead %tr + %th %th= t('route_elements.index.var_in') %th= t('route_elements.index.var_out') %th= t('route_elements.index.pattern') @@ -11,6 +12,7 @@ %tbody - for route_element in route_elements %tr + %td= route_element.position %td= route_element.var_in %td= route_element.var_out %td= route_element.pattern diff --git a/app/views/route_elements/show.html.haml b/app/views/route_elements/show.html.haml index 808f2a0..1d07cbc 100644 --- a/app/views/route_elements/show.html.haml +++ b/app/views/route_elements/show.html.haml @@ -1,5 +1,8 @@ - content_for :title, t("route_elements.show.page_title") +%p + %strong= t('route_elements.show.position') + ":" + = @route_element.position %p %strong= t('route_elements.show.var_in') + ":" = @route_element.var_in -- cgit v1.2.3 From ba5b2737365592cc511a526a3b14be46c3a75467 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 2 Feb 2013 11:42:52 +0100 Subject: Created a sortable table for the call_routes. #151 --- app/views/call_routes/_index_core.html.haml | 58 +++++++++++++++-------------- app/views/call_routes/index.html.haml | 11 ++---- 2 files changed, 34 insertions(+), 35 deletions(-) (limited to 'app/views') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 52a45ba..9eae9ee 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,29 +1,31 @@ -- cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do - %table.table.table-striped - %thead - %tr - %th - %th= t('call_routes.index.name') - %th= t('route_elements.index.pattern') - %th= t('call_routes.index.endpoint') +/ - cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do +%table.table.table-striped{ :id => "call_routes" } + %thead + %tr + %th + %th= t('call_routes.index.name') + %th= t('route_elements.index.pattern') + %th= t('call_routes.index.endpoint') - %tbody - - for call_route in call_routes - - cache(['call_route_single_table_row', call_route, call_routes.count]) do - %tr - %td= call_route.position - %td= call_route.name - %td - - if call_route.route_elements.any? - = call_route.route_elements.first.pattern - - if call_route.route_elements.count > 1 - = ', ...' - - else - = '-' - %td - - endpoint = call_route.endpoint - - if endpoint - = endpoint - - else - = call_route.endpoint_type - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} + %tbody + - for call_route in call_routes + / - cache(['call_route_single_table_row', call_route, call_routes.count]) do + = content_tag_for :tr, call_route do + %td + %span.handle + %i.icon-resize-vertical + %td= call_route.name + %td + - if call_route.route_elements.any? + = call_route.route_elements.first.pattern + - if call_route.route_elements.count > 1 + = ', ...' + - else + = '-' + %td + - endpoint = call_route.endpoint + - if endpoint + = endpoint + - else + = call_route.endpoint_type + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml index 488e1c7..d5181e3 100644 --- a/app/views/call_routes/index.html.haml +++ b/app/views/call_routes/index.html.haml @@ -1,11 +1,8 @@ - content_for :title, t("call_routes.index.page_title") -- if @call_routes && @call_routes.count > 0 - %table.table.table-striped - - @routing_tables.each do |routing_table| - %tr - %td{:colspan => 3} - %h3= routing_table - = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table) +- if @call_routes && @call_routes.any? + - @routing_tables.each do |routing_table| + %h3= routing_table + = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table) = render :partial => 'shared/create_link', :locals => {:child_class => CallRoute} -- cgit v1.2.3 From 30d3aa5178e237e49a37f6ee8d0dcb25ac501e24 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 2 Feb 2013 15:04:45 +0100 Subject: Add version number to a new issue. --- app/views/layouts/_footer.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 97bf483..3d4658b 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -14,6 +14,6 @@ %li = link_to 'GS5 Google Group', "https://groups.google.com/group/gs5-users/" %li - =link_to t('misc.send_a_bugreport'), URI::escape("https://github.com/amooma/GS5/issues/new?title=Bugreport&body=URL which triggered the bugreport is: #{request.fullpath}\nGS5 buildname: #{(GsParameter.get('GEMEINSCHAFT_BUILDNAME').blank? ? 'unknown' : GsParameter.get('GEMEINSCHAFT_BUILDNAME'))}\n\nPlease provide your bugreport below this line and update the title of this issue to a more specific one.") + =link_to t('misc.send_a_bugreport'), URI::escape("https://github.com/amooma/GS5/issues/new?title=Bugreport&body=URL which triggered the bugreport is: #{request.fullpath}\nGS5 buildname: #{(GsParameter.get('GEMEINSCHAFT_BUILDNAME').blank? ? 'unknown' : GsParameter.get('GEMEINSCHAFT_BUILDNAME'))} (#{GsParameter.get('GEMEINSCHAFT_VERSION')})\n\nPlease provide your bugreport below this line and update the title of this issue to a more specific one.") %li{:class => 'pull-right'} = link_to 'brought to you by AMOOMA GmbH', 'http://amooma.de' \ No newline at end of file -- cgit v1.2.3 From 2e5789bcaf38a7c2b8b6ffabe9140b4517dcffc8 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 2 Feb 2013 15:36:41 +0100 Subject: Set a trunk_access_code during setup. #126 --- app/views/gemeinschaft_setups/new.de.html.haml | 1 + app/views/gemeinschaft_setups/new.html.haml | 1 + 2 files changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml index cf1f207..f977291 100644 --- a/app/views/gemeinschaft_setups/new.de.html.haml +++ b/app/views/gemeinschaft_setups/new.de.html.haml @@ -14,6 +14,7 @@ = f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false = f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false = f.input :default_area_code, :label => t('gemeinschaft_setups.form.default_area_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_area_code.hint') + = f.input :trunk_access_code, :label => t('gemeinschaft_setups.form.trunk_access_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.trunk_access_code.hint') = f.input :default_company_name, :label => t('gemeinschaft_setups.form.default_company_name.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_company_name.hint') diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml index 5e2434e..44d9c5b 100644 --- a/app/views/gemeinschaft_setups/new.html.haml +++ b/app/views/gemeinschaft_setups/new.html.haml @@ -14,6 +14,7 @@ = f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false = f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false = f.input :default_area_code, :label => t('gemeinschaft_setups.form.default_area_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_area_code.hint') + = f.input :trunk_access_code, :label => t('gemeinschaft_setups.form.trunk_access_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.trunk_access_code.hint') = f.input :default_company_name, :label => t('gemeinschaft_setups.form.default_company_name.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_company_name.hint') -- cgit v1.2.3 From 66a53a49705c269d73f9d51bb0d4a51283049c71 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Feb 2013 13:00:45 +0100 Subject: Changed softkey table to be sortable. #150 --- app/views/sip_accounts/show.html.haml | 8 ++++---- app/views/softkeys/_index_core.html.haml | 32 ++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 18 deletions(-) (limited to 'app/views') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 72e10df..f48d927 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -65,16 +65,16 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } -- if @sip_account.phone_numbers.count > 0 || can?(:create, @sip_account.phone_numbers.build) +- if @sip_account.phone_numbers.any? || can?(:create, @sip_account.phone_numbers.build) %h2= t('phone_numbers.index.page_title') - - if @sip_account.phone_numbers.count > 0 + - if @sip_account.phone_numbers.any? = render "phone_numbers/index_core", :phone_numbers => @sip_account.phone_numbers %br = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => PhoneNumber } -- if @sip_account.softkeys.count > 0 || can?(:create, @sip_account.softkeys.build) +- if @sip_account.softkeys.any? || can?(:create, @sip_account.softkeys.build) %h2= t("softkeys.index.page_title") - - if @sip_account.softkeys.count > 0 + - if @sip_account.softkeys.any? = render "softkeys/index_core", :softkeys => @sip_account.softkeys %br = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => Softkey } \ No newline at end of file diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml index 398ee51..4ebb29c 100644 --- a/app/views/softkeys/_index_core.html.haml +++ b/app/views/softkeys/_index_core.html.haml @@ -1,15 +1,19 @@ -%table.table.table-striped - %thead - %tr - %th= t('softkeys.index.function') - %th= t('softkeys.index.number') - %th= t('softkeys.index.label') - - %tbody - - for softkey in softkeys.order(:position) +- cache(['softkeys', I18n.locale, current_user, softkeys]) do + %table.table.table-striped{ :id => "softkeys" } + %thead %tr - %td - =softkey.to_s - %td= softkey.number - %td= softkey.label - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file + %th + %th= t('softkeys.index.function') + %th= t('softkeys.index.number') + %th= t('softkeys.index.label') + + %tbody + - for softkey in softkeys + = content_tag_for :tr, softkey do + %td + %span.handle + %i.icon-resize-vertical + %td= softkey.function + %td= softkey.number + %td= softkey.label + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file -- cgit v1.2.3 From 636be20a183fac10637fea700f55f89bc371577b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Feb 2013 13:51:15 +0100 Subject: Refactoring and bugfixes. --- app/views/call_routes/_index_core.html.haml | 60 ++++++++++++++--------------- app/views/softkeys/_index_core.html.haml | 23 +++++------ 2 files changed, 42 insertions(+), 41 deletions(-) (limited to 'app/views') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 9eae9ee..b6c5d33 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,31 +1,31 @@ -/ - cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do -%table.table.table-striped{ :id => "call_routes" } - %thead - %tr - %th - %th= t('call_routes.index.name') - %th= t('route_elements.index.pattern') - %th= t('call_routes.index.endpoint') +- cache(['call_routes_table', I18n.locale, call_routes.count, call_routes.reorder(:updated_at).last]) do + %table.table.table-striped + %thead + %tr + %th + %th= t('call_routes.index.name') + %th= t('route_elements.index.pattern') + %th= t('call_routes.index.endpoint') - %tbody - - for call_route in call_routes - / - cache(['call_route_single_table_row', call_route, call_routes.count]) do - = content_tag_for :tr, call_route do - %td - %span.handle - %i.icon-resize-vertical - %td= call_route.name - %td - - if call_route.route_elements.any? - = call_route.route_elements.first.pattern - - if call_route.route_elements.count > 1 - = ', ...' - - else - = '-' - %td - - endpoint = call_route.endpoint - - if endpoint - = endpoint - - else - = call_route.endpoint_type - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} + %tbody{ :id => "call_routes", :'data-update-url' => sort_call_routes_url} + - for call_route in call_routes + - cache(['call_route_single_table_row', I18n.locale, call_route]) do + = content_tag_for :tr, call_route do + %td + %span.handle + %i.icon-resize-vertical + %td= call_route.name + %td + - if call_route.route_elements.any? + = call_route.route_elements.first.pattern + - if call_route.route_elements.count > 1 + = ', ...' + - else + = '-' + %td + - endpoint = call_route.endpoint + - if endpoint + = endpoint + - else + = call_route.endpoint_type + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml index 4ebb29c..70c96bc 100644 --- a/app/views/softkeys/_index_core.html.haml +++ b/app/views/softkeys/_index_core.html.haml @@ -1,5 +1,5 @@ -- cache(['softkeys', I18n.locale, current_user, softkeys]) do - %table.table.table-striped{ :id => "softkeys" } +- cache(['softkeys_table', I18n.locale, current_user, softkeys]) do + %table.table.table-striped %thead %tr %th @@ -7,13 +7,14 @@ %th= t('softkeys.index.number') %th= t('softkeys.index.label') - %tbody + %tbody{ :id => "softkeys", :'data-update-url' => sort_softkeys_url} - for softkey in softkeys - = content_tag_for :tr, softkey do - %td - %span.handle - %i.icon-resize-vertical - %td= softkey.function - %td= softkey.number - %td= softkey.label - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file + - cache(['softkeys_table_tr', I18n.locale, current_user, softkey]) do + = content_tag_for :tr, softkey do + %td + %span.handle + %i.icon-resize-vertical + %td= softkey.function + %td= softkey.number + %td= softkey.label + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file -- cgit v1.2.3 From 3dead8f9bd964c7330f193cbec82afe44db4149d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Feb 2013 14:23:26 +0100 Subject: intermediate step --- app/views/phone_numbers/_index_core.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/phone_numbers/_index_core.html.haml b/app/views/phone_numbers/_index_core.html.haml index 80a1608..b68e5af 100644 --- a/app/views/phone_numbers/_index_core.html.haml +++ b/app/views/phone_numbers/_index_core.html.haml @@ -1,13 +1,17 @@ %table.table.table-striped %thead %tr + %th - if phone_numbers.count > 1 && phone_numbers.first.phone_numberable_type == 'PhoneBookEntry' %th= t('phone_numbers.index.name') %th= t('phone_numbers.index.number') - %tbody + %tbody{ :id => "phone_numbers", :'data-update-url' => sort_phone_numbers_url} - for phone_number in phone_numbers.order(:position) - %tr + = content_tag_for :tr, phone_number do + %td + %span.handle + %i.icon-resize-vertical - if phone_number.phone_numberable_type == 'PhoneBookEntry' %td= phone_number.name %td= phone_number -- cgit v1.2.3 From 87634e025711be508501cce8c05f23085dad8f9d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Feb 2013 14:31:12 +0100 Subject: Bugfixes --- app/views/phone_numbers/_index_core.html.haml | 5 +++-- app/views/sip_accounts/show.html.haml | 8 ++++---- app/views/softkeys/_index_core.html.haml | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/phone_numbers/_index_core.html.haml b/app/views/phone_numbers/_index_core.html.haml index b68e5af..85982da 100644 --- a/app/views/phone_numbers/_index_core.html.haml +++ b/app/views/phone_numbers/_index_core.html.haml @@ -10,8 +10,9 @@ - for phone_number in phone_numbers.order(:position) = content_tag_for :tr, phone_number do %td - %span.handle - %i.icon-resize-vertical + - if phone_numbers.count > 1 + %span.handle + %i.icon-resize-vertical - if phone_number.phone_numberable_type == 'PhoneBookEntry' %td= phone_number.name %td= phone_number diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index f48d927..72e10df 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -65,16 +65,16 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } -- if @sip_account.phone_numbers.any? || can?(:create, @sip_account.phone_numbers.build) +- if @sip_account.phone_numbers.count > 0 || can?(:create, @sip_account.phone_numbers.build) %h2= t('phone_numbers.index.page_title') - - if @sip_account.phone_numbers.any? + - if @sip_account.phone_numbers.count > 0 = render "phone_numbers/index_core", :phone_numbers => @sip_account.phone_numbers %br = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => PhoneNumber } -- if @sip_account.softkeys.any? || can?(:create, @sip_account.softkeys.build) +- if @sip_account.softkeys.count > 0 || can?(:create, @sip_account.softkeys.build) %h2= t("softkeys.index.page_title") - - if @sip_account.softkeys.any? + - if @sip_account.softkeys.count > 0 = render "softkeys/index_core", :softkeys => @sip_account.softkeys %br = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => Softkey } \ No newline at end of file diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml index 70c96bc..e2cb16c 100644 --- a/app/views/softkeys/_index_core.html.haml +++ b/app/views/softkeys/_index_core.html.haml @@ -12,8 +12,9 @@ - cache(['softkeys_table_tr', I18n.locale, current_user, softkey]) do = content_tag_for :tr, softkey do %td - %span.handle - %i.icon-resize-vertical + - if softkeys.count > 1 + %span.handle + %i.icon-resize-vertical %td= softkey.function %td= softkey.number %td= softkey.label -- cgit v1.2.3 From b96d198d486cebad9eb803088de39262bef2e4d7 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 4 Feb 2013 15:48:30 +0100 Subject: sip_expiry_seconds --- app/views/config_snom/show.xml.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml index 30bee56..53b300c 100644 --- a/app/views/config_snom/show.xml.haml +++ b/app/views/config_snom/show.xml.haml @@ -121,7 +121,7 @@ %user_realname{:idx => index, :perm => 'R'}= sip_account[:realname] %user_idle_text{:idx => index, :perm => 'R'}= sip_account[:idle_text] %user_mailbox{:idx => index, :perm => 'R'}= sip_account[:mailbox] - %user_expiry{:idx => index, :perm => 'R'}= '' + %user_expiry{:idx => index, :perm => 'R'}= sip_account[:expiry] %user_server_type{:idx => index, :perm => 'R'}= 'default' %user_send_local_name{:idx => index, :perm => 'RW'}= 'on' %user_dtmf_info{:idx => index, :perm => 'RW'}= 'off' -- cgit v1.2.3 From bb8168c33f9501fe877345a7bbc7b7f7b64cdfc7 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 5 Feb 2013 12:40:42 +0100 Subject: Added a BackupJob scaffold. --- app/views/backup_jobs/_form.html.haml | 7 +++++++ app/views/backup_jobs/_form_core.html.haml | 6 ++++++ app/views/backup_jobs/_index_core.html.haml | 17 +++++++++++++++++ app/views/backup_jobs/edit.html.haml | 3 +++ app/views/backup_jobs/index.html.haml | 6 ++++++ app/views/backup_jobs/new.html.haml | 3 +++ app/views/backup_jobs/show.html.haml | 19 +++++++++++++++++++ 7 files changed, 61 insertions(+) create mode 100644 app/views/backup_jobs/_form.html.haml create mode 100644 app/views/backup_jobs/_form_core.html.haml create mode 100644 app/views/backup_jobs/_index_core.html.haml create mode 100644 app/views/backup_jobs/edit.html.haml create mode 100644 app/views/backup_jobs/index.html.haml create mode 100644 app/views/backup_jobs/new.html.haml create mode 100644 app/views/backup_jobs/show.html.haml (limited to 'app/views') diff --git a/app/views/backup_jobs/_form.html.haml b/app/views/backup_jobs/_form.html.haml new file mode 100644 index 0000000..e0adceb --- /dev/null +++ b/app/views/backup_jobs/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@backup_job) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('backup_jobs.form.submit') \ No newline at end of file diff --git a/app/views/backup_jobs/_form_core.html.haml b/app/views/backup_jobs/_form_core.html.haml new file mode 100644 index 0000000..536fb18 --- /dev/null +++ b/app/views/backup_jobs/_form_core.html.haml @@ -0,0 +1,6 @@ +.inputs + = f.input :started_at, :label => t('backup_jobs.form.started_at.label'), :hint => conditional_hint('backup_jobs.form.started_at.hint') + = f.input :finished_at, :label => t('backup_jobs.form.finished_at.label'), :hint => conditional_hint('backup_jobs.form.finished_at.hint') + = f.input :state, :label => t('backup_jobs.form.state.label'), :hint => conditional_hint('backup_jobs.form.state.hint') + = f.input :directory, :label => t('backup_jobs.form.directory.label'), :hint => conditional_hint('backup_jobs.form.directory.hint') + = f.input :size_of_the_backup, :label => t('backup_jobs.form.size_of_the_backup.label'), :hint => conditional_hint('backup_jobs.form.size_of_the_backup.hint') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml new file mode 100644 index 0000000..6babf3e --- /dev/null +++ b/app/views/backup_jobs/_index_core.html.haml @@ -0,0 +1,17 @@ +%table.table.table-striped + %tr + %th= t('backup_jobs.index.started_at') + %th= t('backup_jobs.index.finished_at') + %th= t('backup_jobs.index.state') + %th= t('backup_jobs.index.directory') + %th= t('backup_jobs.index.size_of_the_backup') + + + - for backup_job in backup_jobs + %tr + %td= backup_job.started_at + %td= backup_job.finished_at + %td= backup_job.state + %td= backup_job.directory + %td= backup_job.size_of_the_backup + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} \ No newline at end of file diff --git a/app/views/backup_jobs/edit.html.haml b/app/views/backup_jobs/edit.html.haml new file mode 100644 index 0000000..7892edb --- /dev/null +++ b/app/views/backup_jobs/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("backup_jobs.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/backup_jobs/index.html.haml b/app/views/backup_jobs/index.html.haml new file mode 100644 index 0000000..0bb4747 --- /dev/null +++ b/app/views/backup_jobs/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("backup_jobs.index.page_title") + +- if @backup_jobs && @backup_jobs.count > 0 + = render "index_core", :backup_jobs => @backup_jobs + += render :partial => 'shared/create_link', :locals => {:child_class => BackupJob} \ No newline at end of file diff --git a/app/views/backup_jobs/new.html.haml b/app/views/backup_jobs/new.html.haml new file mode 100644 index 0000000..65efd4f --- /dev/null +++ b/app/views/backup_jobs/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("backup_jobs.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml new file mode 100644 index 0000000..7f021bb --- /dev/null +++ b/app/views/backup_jobs/show.html.haml @@ -0,0 +1,19 @@ +- content_for :title, t("backup_jobs.show.page_title") + +%p + %strong= t('backup_jobs.show.started_at') + ":" + = @backup_job.started_at +%p + %strong= t('backup_jobs.show.finished_at') + ":" + = @backup_job.finished_at +%p + %strong= t('backup_jobs.show.state') + ":" + = @backup_job.state +%p + %strong= t('backup_jobs.show.directory') + ":" + = @backup_job.directory +%p + %strong= t('backup_jobs.show.size_of_the_backup') + ":" + = @backup_job.size_of_the_backup + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job } \ No newline at end of file -- cgit v1.2.3 From 6d4de81a703b11f75792790a1b41f963240bd839 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 5 Feb 2013 12:47:18 +0100 Subject: Added navigation I18n for "Admin-Docu". #142 --- app/views/layouts/_navbar.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 9350de0..335dd3d 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -14,10 +14,10 @@ - if current_user && GemeinschaftSetup.any? && current_user.admin? - if current_page?(page_help_path) %li.active - =link_to 'Admin-Doku', page_help_path + =link_to t('navigation.admin_docu'), page_help_path - else %li - =link_to 'Admin-Doku', page_help_path + =link_to t('navigation.admin_docu'), page_help_path - if current_user && current_user.sip_accounts.any? %li %a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)} -- cgit v1.2.3 From dbb0715f4622ad55fce36e51e3a5d046180a0ea7 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 5 Feb 2013 12:54:11 +0100 Subject: Translations for tenant#show view (admin mode). #137 --- app/views/tenants/_admin_area.de.html.haml | 40 ++++++++++++++++++++++++++++++ app/views/tenants/_admin_area.en.html.haml | 40 ++++++++++++++++++++++++++++++ app/views/tenants/_admin_area.html.haml | 40 ------------------------------ 3 files changed, 80 insertions(+), 40 deletions(-) create mode 100644 app/views/tenants/_admin_area.de.html.haml create mode 100644 app/views/tenants/_admin_area.en.html.haml delete mode 100644 app/views/tenants/_admin_area.html.haml (limited to 'app/views') diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml new file mode 100644 index 0000000..98809d1 --- /dev/null +++ b/app/views/tenants/_admin_area.de.html.haml @@ -0,0 +1,40 @@ + +.row + .span12 + = render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant} + - if SipAccount.any? + = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant} + + - if SipAccount.any? || Gateway.any? + = render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant} + + = render :partial => 'tenants/users_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} + + = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + + .well + %h2 Gemeinschaft Konfiguration + = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} + + %p + Das System kann + = PhoneModel.count + verschiedene Telefonmodelle von den folgenden Herstellern automatisch provisionieren: + - Manufacturer.all.each do |manufacturer| + - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last + = succeed ', ' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) + - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last + = succeed ' und ' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) + - else + = succeed '.' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) + + = render :partial => 'call_routes', :locals => {:tenant => tenant} + + = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml new file mode 100644 index 0000000..4f0032c --- /dev/null +++ b/app/views/tenants/_admin_area.en.html.haml @@ -0,0 +1,40 @@ + +.row + .span12 + = render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant} + - if SipAccount.any? + = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant} + + - if SipAccount.any? || Gateway.any? + = render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant} + + = render :partial => 'tenants/users_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} + + = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + + .well + %h2 Gemeinschaft Configuration + = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} + + %p + This system can provision a total of + = PhoneModel.count + different phone models of the following manufacturers: + - Manufacturer.all.each do |manufacturer| + - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last + = succeed ', ' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) + - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last + = succeed ' and ' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) + - else + = succeed '.' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) + + = render :partial => 'call_routes', :locals => {:tenant => tenant} + + = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml deleted file mode 100644 index 28a8273..0000000 --- a/app/views/tenants/_admin_area.html.haml +++ /dev/null @@ -1,40 +0,0 @@ - -.row - .span12 - = render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant} - - if SipAccount.any? - = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant} - - - if SipAccount.any? || Gateway.any? - = render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant} - = render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant} - = render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant} - = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant} - - = render :partial => 'tenants/users_table', :locals => {:tenant => tenant} - = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} - - = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} - - .well - %h2 Gemeinschaft Konfiguration - = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} - - %p - Das System kann - = PhoneModel.count - verschiedene Telefonmodelle von den folgenden Herstellern verwalten: - - Manufacturer.all.each do |manufacturer| - - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last - = succeed ', ' do - =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last - = succeed ' und ' do - =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - - else - = succeed '.' do - =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - - = render :partial => 'call_routes', :locals => {:tenant => tenant} - - = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file -- cgit v1.2.3 From bcce809c6e628fb7c067437e98a5195c5e228532 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 5 Feb 2013 13:58:58 +0100 Subject: show dialplan variables --- app/views/call_routes/show_variables.html.haml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/views/call_routes/show_variables.html.haml (limited to 'app/views') diff --git a/app/views/call_routes/show_variables.html.haml b/app/views/call_routes/show_variables.html.haml new file mode 100644 index 0000000..4bec39d --- /dev/null +++ b/app/views/call_routes/show_variables.html.haml @@ -0,0 +1,13 @@ +%h3= 'Channel Variables' + +%table.table.table-striped + %thead + %tr + %th= 'Variable' + %th= 'Value' + + %tbody{ :id => "show_variables" } + - @channel_variables.each do |key, value| + %tr + %td= key + %td= value.gsub(/\n/, '
').html_safe -- cgit v1.2.3 From e5b247ccefe499f61bdadef186e34d03ded3035a Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 6 Feb 2013 03:23:20 +0100 Subject: Stupid setting removed --- app/views/config_snom/show.xml.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml index 53b300c..33204dc 100644 --- a/app/views/config_snom/show.xml.haml +++ b/app/views/config_snom/show.xml.haml @@ -42,7 +42,7 @@ %prefer_saved_over_received_photo{:perm => 'RW'}= 'off' %no_dnd{:perm => 'RW'}= 'off' %transfer_on_hangup{:perm => 'RW'}= 'on' - %transfer_on_hangup_non_pots{:perm => 'RW'}= 'on' + %transfer_on_hangup_non_pots{:perm => 'RW'}= 'off' %call_join_xfer{:perm => 'RW'}= 'on' %conf_hangup{:perm => 'RW'}= 'on' %logon_wizard{:perm => 'RW'}= 'off' -- cgit v1.2.3 From 3edd6e58ea3f5d25068ea9d47f639ae89e5f2c0c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 6 Feb 2013 11:07:04 +0100 Subject: Improved the backup. --- app/views/backup_jobs/_index_core.html.haml | 19 +++++++++++++++---- app/views/backup_jobs/show.html.haml | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index 6babf3e..a1bf0d0 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -8,10 +8,21 @@ - for backup_job in backup_jobs - %tr - %td= backup_job.started_at - %td= backup_job.finished_at + - if backup_job.state == 'queued' + - row_marker = 'warning' + - else + - if backup_job.state == 'failed' + - row_marker = 'error' + - else + - row_marker = '' + %tr{:class => row_marker} + %td + - if backup_job.finished_at.blank? + = time_ago_in_words(backup_job.finished_at) + - else + = l backup_job.started_at, :format => :short + %td= l backup_job.finished_at, :format => :short %td= backup_job.state %td= backup_job.directory - %td= backup_job.size_of_the_backup + %td= number_to_human_size(backup_job.size_of_the_backup, :precision => 2) =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} \ No newline at end of file diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 7f021bb..65091b8 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -14,6 +14,6 @@ = @backup_job.directory %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - = @backup_job.size_of_the_backup + = number_to_human_size(@backup_job.size_of_the_backup, :precision => 2) = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job } \ No newline at end of file -- cgit v1.2.3 From 16a2074982644614f3ef13c15681b5c89feb586b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 6 Feb 2013 11:24:14 +0100 Subject: HTML fix. --- app/views/backup_jobs/_index_core.html.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index a1bf0d0..aceeb5b 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -5,6 +5,7 @@ %th= t('backup_jobs.index.state') %th= t('backup_jobs.index.directory') %th= t('backup_jobs.index.size_of_the_backup') + %th{:colspan => '2'} - for backup_job in backup_jobs -- cgit v1.2.3 From c26e4b9d27218378f34175ac3410eab5b12a5713 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 6 Feb 2013 12:19:23 +0100 Subject: View improvements. --- app/views/backup_jobs/_index_core.html.haml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index aceeb5b..a706424 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -3,7 +3,6 @@ %th= t('backup_jobs.index.started_at') %th= t('backup_jobs.index.finished_at') %th= t('backup_jobs.index.state') - %th= t('backup_jobs.index.directory') %th= t('backup_jobs.index.size_of_the_backup') %th{:colspan => '2'} @@ -17,13 +16,16 @@ - else - row_marker = '' %tr{:class => row_marker} - %td - - if backup_job.finished_at.blank? - = time_ago_in_words(backup_job.finished_at) - - else + - if backup_job.finished_at.blank? + %td{:colspan => '2'} + = time_ago_in_words(backup_job.started_at) + - else + %td = l backup_job.started_at, :format => :short - %td= l backup_job.finished_at, :format => :short + %td + = l backup_job.finished_at, :format => :short %td= backup_job.state - %td= backup_job.directory - %td= number_to_human_size(backup_job.size_of_the_backup, :precision => 2) + %td + - if !backup_job.size_of_the_backup.blank? + = number_to_human_size(backup_job.size_of_the_backup, :precision => 2) =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} \ No newline at end of file -- cgit v1.2.3 From 5e8237d8a8cf17009189fcf0259fb1b8a50ab429 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 7 Feb 2013 10:49:01 +0100 Subject: Bugfixes. --- app/views/backup_jobs/_form_core.html.haml | 1 - app/views/backup_jobs/_index_core.html.haml | 4 ++-- app/views/backup_jobs/show.html.haml | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/backup_jobs/_form_core.html.haml b/app/views/backup_jobs/_form_core.html.haml index 536fb18..9d439c5 100644 --- a/app/views/backup_jobs/_form_core.html.haml +++ b/app/views/backup_jobs/_form_core.html.haml @@ -3,4 +3,3 @@ = f.input :finished_at, :label => t('backup_jobs.form.finished_at.label'), :hint => conditional_hint('backup_jobs.form.finished_at.hint') = f.input :state, :label => t('backup_jobs.form.state.label'), :hint => conditional_hint('backup_jobs.form.state.hint') = f.input :directory, :label => t('backup_jobs.form.directory.label'), :hint => conditional_hint('backup_jobs.form.directory.hint') - = f.input :size_of_the_backup, :label => t('backup_jobs.form.size_of_the_backup.label'), :hint => conditional_hint('backup_jobs.form.size_of_the_backup.hint') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index a706424..9eebefd 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -26,6 +26,6 @@ = l backup_job.finished_at, :format => :short %td= backup_job.state %td - - if !backup_job.size_of_the_backup.blank? - = number_to_human_size(backup_job.size_of_the_backup, :precision => 2) + - if backup_job.backup_file? + = number_to_human_size(backup_job.backup_file.size, :precision => 2) =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} \ No newline at end of file diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 65091b8..5d85bbc 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -14,6 +14,7 @@ = @backup_job.directory %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - = number_to_human_size(@backup_job.size_of_the_backup, :precision => 2) + - if @backup_job.backup_file? + = number_to_human_size(@backup_job.backup_file.size, :precision => 2) = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job } \ No newline at end of file -- cgit v1.2.3 From cd909970e8443ca86ad0be09b26cf5fb616ea303 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 8 Feb 2013 10:06:34 +0100 Subject: softkey.softkey_function vs. softkey.function --- app/views/softkeys/_form_core.html.haml | 2 +- app/views/softkeys/_index_core.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/softkeys/_form_core.html.haml b/app/views/softkeys/_form_core.html.haml index b833aad..2863d5c 100644 --- a/app/views/softkeys/_form_core.html.haml +++ b/app/views/softkeys/_form_core.html.haml @@ -7,6 +7,6 @@ .inputs = f.input :softkey_function_id, :as => :select, :collection => @softkey_functions.map {|x| [I18n.t("softkeys.functions.#{x}"), x.id] }, :label => t('softkeys.form.function.label'), :hint => conditional_hint('softkeys.form.function.hint'), :include_blank => false - if @available_call_forwards && @available_call_forwards.count > 0 - = f.association :call_forward, :collection => @available_call_forwards, :label => t('softkeys.form.call_forward.label'), :hint => conditional_hint('softkeys.form.call_forward.hint'), :include_blank => false + = f.association :softkeyable, :collection => @available_call_forwards, :label => t('softkeys.form.call_forward.label'), :hint => conditional_hint('softkeys.form.call_forward.hint'), :include_blank => false = f.input :number, :label => t('softkeys.form.number.label'), :hint => conditional_hint('softkeys.form.number.hint') = f.input :label, :label => t('softkeys.form.label.label'), :hint => conditional_hint('softkeys.form.label.hint') diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml index e2cb16c..4a06c72 100644 --- a/app/views/softkeys/_index_core.html.haml +++ b/app/views/softkeys/_index_core.html.haml @@ -15,7 +15,7 @@ - if softkeys.count > 1 %span.handle %i.icon-resize-vertical - %td= softkey.function + %td= t("softkeys.functions.#{softkey.softkey_function}") %td= softkey.number %td= softkey.label =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file -- cgit v1.2.3 From 9e723519982c3b442aa90f3728bfddd4025d4a69 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 8 Feb 2013 10:41:18 +0100 Subject: softkey-call_forward relation polymorphic --- app/views/gs_nodes/sync.xml.haml | 2 +- app/views/softkeys/show.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/gs_nodes/sync.xml.haml b/app/views/gs_nodes/sync.xml.haml index 0f097f8..a2fa71a 100644 --- a/app/views/gs_nodes/sync.xml.haml +++ b/app/views/gs_nodes/sync.xml.haml @@ -60,7 +60,7 @@ - if !@softkeys.blank? %softkeys - @softkeys.each do |softkey| - %softkey{ :uuid => softkey.uuid, :function => softkey.softkey_function.try(:name), :number => softkey.number, :label => softkey.label, :position => softkey.position, :created_at => softkey.created_at, :updated_at => softkey.updated_at, :sip_account_uuid => softkey.sip_account.try(:uuid), :call_forward_uuid => softkey.call_forward.try(:uuid) } + %softkey{ :uuid => softkey.uuid, :function => softkey.softkey_function.try(:name), :number => softkey.number, :label => softkey.label, :position => softkey.position, :created_at => softkey.created_at, :updated_at => softkey.updated_at, :sip_account_uuid => softkey.sip_account.try(:uuid), :softkeyable_uuid => softkey.softkeyable.try(:uuid), :softkeyable_type => softkey.softkeyable_type) } - if !@ringtones.blank? %ringtones diff --git a/app/views/softkeys/show.html.haml b/app/views/softkeys/show.html.haml index d0db111..7c068ae 100644 --- a/app/views/softkeys/show.html.haml +++ b/app/views/softkeys/show.html.haml @@ -1,7 +1,7 @@ - content_for :title, t("softkeys.show.page_title") %p - %strong= t('softkeys.show.function') + ":" + %strong= t("softkeys.functions.#{@softkey.softkey_function}") + ":" =@softkey.to_s -= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @softkey.sip_account, :child => @softkey } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @softkey.sip_account, :child => @softkey } -- cgit v1.2.3 From ff67b61369dba20747babfb642fb2086bbaff4a9 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 09:51:22 +0100 Subject: gateway xml view added --- app/views/gateways/show.xml.haml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/views/gateways/show.xml.haml (limited to 'app/views') diff --git a/app/views/gateways/show.xml.haml b/app/views/gateways/show.xml.haml new file mode 100644 index 0000000..5e2806d --- /dev/null +++ b/app/views/gateways/show.xml.haml @@ -0,0 +1,17 @@ +!!! XML +%gateway{ :id => @gateway.id, :name => @gateway.name, :technology => @gateway.technology, :inbound => @gateway.inbound.to_s, :outbound => @gateway.outbound.to_s, :description => @gateway.description } + + %gateway_settings{ :count => @gateway.gateway_settings.count } + - @gateway.gateway_settings.each do |setting| + %setting{ :name => setting.name, :value => setting.value, :class_type => setting.class_type, :description => setting.description } + + %gateway_parameters{ :count => @gateway.gateway_parameters.count } + - @gateway.gateway_parameters.each do |parameter| + %parameter{ :name => parameter.name, :value => parameter.value, :class_type => parameter.class_type, :description => parameter.description } + + %call_routes{ :count => @gateway.call_routes.count } + - @gateway.call_routes.each do |call_route| + %call_route{ :name => call_route.name, :routing_table => call_route.routing_table, :position => call_route.position } + %route_elements{ :count => call_route.route_elements.count } + - call_route.route_elements.each do |route_element| + %route_element{ :var_in => route_element.var_in, :var_out => route_element.var_out, :pattern => route_element.pattern, :replacement => route_element.replacement, :action => route_element.action, :mandatory => route_element.mandatory.to_s, :position => route_element.position } -- cgit v1.2.3 From 42a8e4808e343975042730ab3847303184d73b92 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 10:05:00 +0100 Subject: identifier added --- app/views/gateways/show.xml.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/gateways/show.xml.haml b/app/views/gateways/show.xml.haml index 5e2806d..e0ff21a 100644 --- a/app/views/gateways/show.xml.haml +++ b/app/views/gateways/show.xml.haml @@ -1,5 +1,5 @@ !!! XML -%gateway{ :id => @gateway.id, :name => @gateway.name, :technology => @gateway.technology, :inbound => @gateway.inbound.to_s, :outbound => @gateway.outbound.to_s, :description => @gateway.description } +%gateway{ :identifier => @gateway.identifier, :name => @gateway.name, :technology => @gateway.technology, :inbound => @gateway.inbound.to_s, :outbound => @gateway.outbound.to_s, :description => @gateway.description } %gateway_settings{ :count => @gateway.gateway_settings.count } - @gateway.gateway_settings.each do |setting| -- cgit v1.2.3 From e497de90ccf55b3cbec1de7890e20220fa8e603f Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 10:27:24 +0100 Subject: call_route xml view added --- app/views/call_routes/show.xml.haml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 app/views/call_routes/show.xml.haml (limited to 'app/views') diff --git a/app/views/call_routes/show.xml.haml b/app/views/call_routes/show.xml.haml new file mode 100644 index 0000000..5800816 --- /dev/null +++ b/app/views/call_routes/show.xml.haml @@ -0,0 +1,5 @@ +!!! XML +%call_route{ :name => @call_route.name, :routing_table => @call_route.routing_table, :position => @call_route.position, :endpoint => @call_route.endpoint, :endpoint_type => @call_route.endpoint_type } + %route_elements{ :count => @call_route.route_elements.count } + - @call_route.route_elements.each do |route_element| + %route_element{ :var_in => route_element.var_in, :var_out => route_element.var_out, :pattern => route_element.pattern, :replacement => route_element.replacement, :action => route_element.action, :mandatory => route_element.mandatory.to_s, :position => route_element.position } -- cgit v1.2.3 From cc4dda2b37119e1364cf0a5362aedfae639bcbc7 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 11:12:57 +0100 Subject: duplicate ids fixed --- app/views/call_routes/_index_core.html.haml | 2 +- app/views/call_routes/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index b6c5d33..6f2eadd 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -7,7 +7,7 @@ %th= t('route_elements.index.pattern') %th= t('call_routes.index.endpoint') - %tbody{ :id => "call_routes", :'data-update-url' => sort_call_routes_url} + %tbody{ :id => "call_routes_#{routing_table}", :'data-update-url' => sort_call_routes_url} - for call_route in call_routes - cache(['call_route_single_table_row', I18n.locale, call_route]) do = content_tag_for :tr, call_route do diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml index d5181e3..0108322 100644 --- a/app/views/call_routes/index.html.haml +++ b/app/views/call_routes/index.html.haml @@ -3,6 +3,6 @@ - if @call_routes && @call_routes.any? - @routing_tables.each do |routing_table| %h3= routing_table - = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table) + = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table), :routing_table => routing_table = render :partial => 'shared/create_link', :locals => {:child_class => CallRoute} -- cgit v1.2.3 From 5fba89e83722e11232b1130a1a939d55aed94387 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 11:24:36 +0100 Subject: multiple css ids bug fixed --- app/views/call_routes/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 6f2eadd..a62a9c4 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -7,7 +7,7 @@ %th= t('route_elements.index.pattern') %th= t('call_routes.index.endpoint') - %tbody{ :id => "call_routes_#{routing_table}", :'data-update-url' => sort_call_routes_url} + %tbody{ :class => "call_routes", :id => "call_routes_#{routing_table}", :'data-update-url' => sort_call_routes_url} - for call_route in call_routes - cache(['call_route_single_table_row', I18n.locale, call_route]) do = content_tag_for :tr, call_route do -- cgit v1.2.3 From 4c9cc92c0a49ec34c8bf00e31d1710450fb533fa Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sun, 10 Feb 2013 08:09:05 +0000 Subject: firewall blacklist model added --- app/views/intruders/_form.html.haml | 7 +++++ app/views/intruders/_form_core.html.haml | 16 ++++++++++ app/views/intruders/_index_core.html.haml | 37 +++++++++++++++++++++++ app/views/intruders/edit.html.haml | 3 ++ app/views/intruders/index.html.haml | 6 ++++ app/views/intruders/new.html.haml | 3 ++ app/views/intruders/show.html.haml | 49 +++++++++++++++++++++++++++++++ 7 files changed, 121 insertions(+) create mode 100644 app/views/intruders/_form.html.haml create mode 100644 app/views/intruders/_form_core.html.haml create mode 100644 app/views/intruders/_index_core.html.haml create mode 100644 app/views/intruders/edit.html.haml create mode 100644 app/views/intruders/index.html.haml create mode 100644 app/views/intruders/new.html.haml create mode 100644 app/views/intruders/show.html.haml (limited to 'app/views') diff --git a/app/views/intruders/_form.html.haml b/app/views/intruders/_form.html.haml new file mode 100644 index 0000000..26aab1c --- /dev/null +++ b/app/views/intruders/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@intruder) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('intruders.form.submit') \ No newline at end of file diff --git a/app/views/intruders/_form_core.html.haml b/app/views/intruders/_form_core.html.haml new file mode 100644 index 0000000..ae2da39 --- /dev/null +++ b/app/views/intruders/_form_core.html.haml @@ -0,0 +1,16 @@ +.inputs + = f.input :list_type, :label => t('intruders.form.list_type.label'), :hint => conditional_hint('intruders.form.list_type.hint') + = f.input :key, :label => t('intruders.form.key.label'), :hint => conditional_hint('intruders.form.key.hint') + = f.input :points, :label => t('intruders.form.points.label'), :hint => conditional_hint('intruders.form.points.hint') + = f.input :bans, :label => t('intruders.form.bans.label'), :hint => conditional_hint('intruders.form.bans.hint') + = f.input :ban_last, :label => t('intruders.form.ban_last.label'), :hint => conditional_hint('intruders.form.ban_last.hint') + = f.input :ban_end, :label => t('intruders.form.ban_end.label'), :hint => conditional_hint('intruders.form.ban_end.hint') + = f.input :contact_ip, :label => t('intruders.form.contact_ip.label'), :hint => conditional_hint('intruders.form.contact_ip.hint') + = f.input :contact_port, :label => t('intruders.form.contact_port.label'), :hint => conditional_hint('intruders.form.contact_port.hint') + = f.input :contact_count, :label => t('intruders.form.contact_count.label'), :hint => conditional_hint('intruders.form.contact_count.hint') + = f.input :contact_last, :label => t('intruders.form.contact_last.label'), :hint => conditional_hint('intruders.form.contact_last.hint') + = f.input :contacts_per_second, :label => t('intruders.form.contacts_per_second.label'), :hint => conditional_hint('intruders.form.contacts_per_second.hint') + = f.input :contacts_per_second_max, :label => t('intruders.form.contacts_per_second_max.label'), :hint => conditional_hint('intruders.form.contacts_per_second_max.hint') + = f.input :user_agent, :label => t('intruders.form.user_agent.label'), :hint => conditional_hint('intruders.form.user_agent.hint') + = f.input :to_user, :label => t('intruders.form.to_user.label'), :hint => conditional_hint('intruders.form.to_user.hint') + = f.input :comment, :label => t('intruders.form.comment.label'), :hint => conditional_hint('intruders.form.comment.hint') diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml new file mode 100644 index 0000000..0070c4d --- /dev/null +++ b/app/views/intruders/_index_core.html.haml @@ -0,0 +1,37 @@ +%table.table.table-striped + %tr + %th= t('intruders.index.list_type') + %th= t('intruders.index.key') + %th= t('intruders.index.points') + %th= t('intruders.index.bans') + %th= t('intruders.index.ban_last') + %th= t('intruders.index.ban_end') + %th= t('intruders.index.contact_ip') + %th= t('intruders.index.contact_port') + %th= t('intruders.index.contact_count') + %th= t('intruders.index.contact_last') + %th= t('intruders.index.contacts_per_second') + %th= t('intruders.index.contacts_per_second_max') + %th= t('intruders.index.user_agent') + %th= t('intruders.index.to_user') + %th= t('intruders.index.comment') + + + - for intruder in intruders + %tr + %td= intruder.list_type + %td= intruder.key + %td= intruder.points + %td= intruder.bans + %td= intruder.ban_last + %td= intruder.ban_end + %td= intruder.contact_ip + %td= intruder.contact_port + %td= intruder.contact_count + %td= intruder.contact_last + %td= intruder.contacts_per_second + %td= intruder.contacts_per_second_max + %td= intruder.user_agent + %td= intruder.to_user + %td= intruder.comment + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => intruder} \ No newline at end of file diff --git a/app/views/intruders/edit.html.haml b/app/views/intruders/edit.html.haml new file mode 100644 index 0000000..1b5a31b --- /dev/null +++ b/app/views/intruders/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("intruders.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/intruders/index.html.haml b/app/views/intruders/index.html.haml new file mode 100644 index 0000000..72b8882 --- /dev/null +++ b/app/views/intruders/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("intruders.index.page_title") + +- if @intruders && @intruders.count > 0 + = render "index_core", :intruders => @intruders + += render :partial => 'shared/create_link', :locals => {:child_class => Intruder} \ No newline at end of file diff --git a/app/views/intruders/new.html.haml b/app/views/intruders/new.html.haml new file mode 100644 index 0000000..a24b55f --- /dev/null +++ b/app/views/intruders/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("intruders.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/intruders/show.html.haml b/app/views/intruders/show.html.haml new file mode 100644 index 0000000..fa5f59b --- /dev/null +++ b/app/views/intruders/show.html.haml @@ -0,0 +1,49 @@ +- content_for :title, t("intruders.show.page_title") + +%p + %strong= t('intruders.show.list_type') + ":" + = @intruder.list_type +%p + %strong= t('intruders.show.key') + ":" + = @intruder.key +%p + %strong= t('intruders.show.points') + ":" + = @intruder.points +%p + %strong= t('intruders.show.bans') + ":" + = @intruder.bans +%p + %strong= t('intruders.show.ban_last') + ":" + = @intruder.ban_last +%p + %strong= t('intruders.show.ban_end') + ":" + = @intruder.ban_end +%p + %strong= t('intruders.show.contact_ip') + ":" + = @intruder.contact_ip +%p + %strong= t('intruders.show.contact_port') + ":" + = @intruder.contact_port +%p + %strong= t('intruders.show.contact_count') + ":" + = @intruder.contact_count +%p + %strong= t('intruders.show.contact_last') + ":" + = @intruder.contact_last +%p + %strong= t('intruders.show.contacts_per_second') + ":" + = @intruder.contacts_per_second +%p + %strong= t('intruders.show.contacts_per_second_max') + ":" + = @intruder.contacts_per_second_max +%p + %strong= t('intruders.show.user_agent') + ":" + = @intruder.user_agent +%p + %strong= t('intruders.show.to_user') + ":" + = @intruder.to_user +%p + %strong= t('intruders.show.comment') + ":" + = @intruder.comment + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @intruder } \ No newline at end of file -- cgit v1.2.3 From 70a6449fa176059e603a16a21699c8f5c60765e1 Mon Sep 17 00:00:00 2001 From: spag Date: Sun, 10 Feb 2013 16:59:57 +0100 Subject: intruder updated --- app/views/intruders/_form_core.html.haml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'app/views') diff --git a/app/views/intruders/_form_core.html.haml b/app/views/intruders/_form_core.html.haml index ae2da39..780d8cd 100644 --- a/app/views/intruders/_form_core.html.haml +++ b/app/views/intruders/_form_core.html.haml @@ -1,16 +1,5 @@ .inputs - = f.input :list_type, :label => t('intruders.form.list_type.label'), :hint => conditional_hint('intruders.form.list_type.hint') - = f.input :key, :label => t('intruders.form.key.label'), :hint => conditional_hint('intruders.form.key.hint') - = f.input :points, :label => t('intruders.form.points.label'), :hint => conditional_hint('intruders.form.points.hint') - = f.input :bans, :label => t('intruders.form.bans.label'), :hint => conditional_hint('intruders.form.bans.hint') - = f.input :ban_last, :label => t('intruders.form.ban_last.label'), :hint => conditional_hint('intruders.form.ban_last.hint') - = f.input :ban_end, :label => t('intruders.form.ban_end.label'), :hint => conditional_hint('intruders.form.ban_end.hint') + = f.input :list_type, :collection => Intruder::LIST_TYPES, :label => t('intruders.form.list_type.label'), :hint => conditional_hint('intruders.form.list_type.hint'), :include_blank => false = f.input :contact_ip, :label => t('intruders.form.contact_ip.label'), :hint => conditional_hint('intruders.form.contact_ip.hint') - = f.input :contact_port, :label => t('intruders.form.contact_port.label'), :hint => conditional_hint('intruders.form.contact_port.hint') - = f.input :contact_count, :label => t('intruders.form.contact_count.label'), :hint => conditional_hint('intruders.form.contact_count.hint') - = f.input :contact_last, :label => t('intruders.form.contact_last.label'), :hint => conditional_hint('intruders.form.contact_last.hint') - = f.input :contacts_per_second, :label => t('intruders.form.contacts_per_second.label'), :hint => conditional_hint('intruders.form.contacts_per_second.hint') - = f.input :contacts_per_second_max, :label => t('intruders.form.contacts_per_second_max.label'), :hint => conditional_hint('intruders.form.contacts_per_second_max.hint') - = f.input :user_agent, :label => t('intruders.form.user_agent.label'), :hint => conditional_hint('intruders.form.user_agent.hint') - = f.input :to_user, :label => t('intruders.form.to_user.label'), :hint => conditional_hint('intruders.form.to_user.hint') + = f.input :ban_end, :label => t('intruders.form.ban_end.label'), :hint => conditional_hint('intruders.form.ban_end.hint') = f.input :comment, :label => t('intruders.form.comment.label'), :hint => conditional_hint('intruders.form.comment.hint') -- cgit v1.2.3 From d42afaf3471b6784ac0d7cfc139c84b84698ba0d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 10:09:30 +0100 Subject: Fixed breadcrumbs. #163 --- app/views/fax_accounts/_index_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml index d694f8f..846cda8 100644 --- a/app/views/fax_accounts/_index_core.html.haml +++ b/app/views/fax_accounts/_index_core.html.haml @@ -39,8 +39,8 @@ = time_ago_in_words(fax_account.fax_documents.order(:updated_at).last.updated_at) %td - if can?(:new, FaxDocument, :fax_account_id => fax_account.id) - %a.btn.btn-mini.btn-primary{:href => new_fax_account_fax_document_path(fax_account) } - %i.icon-print.icon-white + %a.btn.btn-small{:href => new_fax_account_fax_document_path(fax_account) } + %i.icon-print %span.hidden-phone =t('fax_accounts.index.send_a_fax') -- cgit v1.2.3 From 84ce49fcd057284225474c3197268a9f8a3c8121 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 10:14:39 +0100 Subject: Added i.icon-print to the button. --- app/views/fax_accounts/show.html.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/fax_accounts/show.html.haml b/app/views/fax_accounts/show.html.haml index 1a32121..454ebee 100644 --- a/app/views/fax_accounts/show.html.haml +++ b/app/views/fax_accounts/show.html.haml @@ -12,7 +12,11 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @fax_account } -= render :partial => 'shared/create_link', :locals => { :parent => @fax_account, :child_class => FaxDocument } +%p + %a.btn.btn-small{:href => new_fax_account_fax_document_path(@fax_account) } + %i.icon-print + %span.hidden-phone + =t('fax_accounts.index.send_a_fax') %h2= t('phone_numbers.index.page_title') - if @fax_account.phone_numbers.count > 0 -- cgit v1.2.3 From 62ac01a8ea536718734bd911fc3642c0bd8b6bc7 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 11 Feb 2013 13:04:05 +0100 Subject: ipwhois added --- app/views/intruders/show.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/intruders/show.html.haml b/app/views/intruders/show.html.haml index fa5f59b..4941e89 100644 --- a/app/views/intruders/show.html.haml +++ b/app/views/intruders/show.html.haml @@ -46,4 +46,7 @@ %strong= t('intruders.show.comment') + ":" = @intruder.comment -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @intruder } \ No newline at end of file +%p + %pre= @intruder.whois + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @intruder } -- cgit v1.2.3 From 29db90c2c8a9a6a3087e77eae8615ddf0049087b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 14:40:38 +0100 Subject: Deleted PrivatePub stuff. --- app/views/system_messages/_form.html.haml | 7 ------- app/views/system_messages/_form_core.html.haml | 2 -- app/views/system_messages/_index_core.html.haml | 12 ------------ app/views/system_messages/index.html.haml | 3 --- app/views/system_messages/new.html.haml | 3 --- app/views/system_messages/show.html.haml | 8 -------- 6 files changed, 35 deletions(-) delete mode 100644 app/views/system_messages/_form.html.haml delete mode 100644 app/views/system_messages/_form_core.html.haml delete mode 100644 app/views/system_messages/_index_core.html.haml delete mode 100644 app/views/system_messages/index.html.haml delete mode 100644 app/views/system_messages/new.html.haml delete mode 100644 app/views/system_messages/show.html.haml (limited to 'app/views') diff --git a/app/views/system_messages/_form.html.haml b/app/views/system_messages/_form.html.haml deleted file mode 100644 index 036ee00..0000000 --- a/app/views/system_messages/_form.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -= simple_form_for([@user, @system_message]) do |f| - = f.error_notification - - = render "form_core", :f => f - - .actions - = f.button :submit, conditional_t('system_messages.form.submit') \ No newline at end of file diff --git a/app/views/system_messages/_form_core.html.haml b/app/views/system_messages/_form_core.html.haml deleted file mode 100644 index a85db28..0000000 --- a/app/views/system_messages/_form_core.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -.inputs - = f.input :content, :label => t('system_messages.form.content.label'), :hint => conditional_hint('system_messages.form.content.hint') diff --git a/app/views/system_messages/_index_core.html.haml b/app/views/system_messages/_index_core.html.haml deleted file mode 100644 index 7c9dab5..0000000 --- a/app/views/system_messages/_index_core.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%table.table.table-striped - %thead - %tr - %th= t('system_messages.index.created_at') - %th= t('system_messages.index.content') - - %tbody - - for system_message in system_messages - %tr - %td= system_message.created_at - %td= system_message.content - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => system_message} \ No newline at end of file diff --git a/app/views/system_messages/index.html.haml b/app/views/system_messages/index.html.haml deleted file mode 100644 index ffd3fc3..0000000 --- a/app/views/system_messages/index.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -- content_for :title, t("system_messages.index.page_title") - -= render "index_core", :system_messages => @system_messages \ No newline at end of file diff --git a/app/views/system_messages/new.html.haml b/app/views/system_messages/new.html.haml deleted file mode 100644 index 565f5c5..0000000 --- a/app/views/system_messages/new.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -- content_for :title, t("system_messages.new.page_title") - -= render "form" diff --git a/app/views/system_messages/show.html.haml b/app/views/system_messages/show.html.haml deleted file mode 100644 index 70be6f2..0000000 --- a/app/views/system_messages/show.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- content_for :title, t("system_messages.show.page_title") - -%p - %strong= t('system_messages.show.created_at') + ":" - = @system_message.created_at -%p - %strong= t('system_messages.show.content') + ":" - = @system_message.content -- cgit v1.2.3 From c5b10519dd1ade04a25c43b100c15deb7e39b6d0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 15:07:23 +0100 Subject: Added entity in the table. But it's fare from pretty. #136 --- app/views/gs_parameters/_index_core.html.haml | 14 ++++++++++++-- app/views/gs_parameters/index.html.haml | 12 +++++------- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index 11d60db..2105126 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -1,6 +1,9 @@ -- cache(['gs_parameters_table_section', gs_parameters.first.section, gs_parameters.reorder(:updated_at).last, gs_parameters.pluck(:id)]) do +- cache(['gs_parameter_sub_table', I18n.locale, gs_parameters.count, gs_parameters.reorder(:updated_at).first, gs_parameters.reorder(:updated_at).last]) do %thead %tr + %th + %span.hidden-phone + = t('gs_parameters.index.entity') %th= t('gs_parameters.index.name') - if !@sections %th= t('gs_parameters.index.section') @@ -8,8 +11,15 @@ %tbody - for gs_parameter in gs_parameters - - cache(['gs_parameters_table_single_row', gs_parameter]) do + - cache(['gs_parameters_table_single_row', I18n.locale, gs_parameter]) do %tr + %td + - if gs_parameter.entity.blank? + %span.hidden-phone + = '-' + - else + %span.hidden-phone + = truncate(gs_parameter.entity, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) %td %span.hidden-phone = truncate(gs_parameter.name, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 1189a45..8df2bb3 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,13 +1,11 @@ - content_for :title, t("gs_parameters.index.page_title") -- if @gs_parameters && @gs_parameters.count > 0 - - cache(['gs_parameters_table', I18n.locale, @gs_parameters_unordered.reorder(:updated_at).last, @gs_parameters_unordered.count]) do +- cache(['gs_parameter_all_tables', I18n.locale, @gs_parameters.count, @gs_parameters.reorder(:updated_at).first, @gs_parameters.reorder(:updated_at).last]) do + - if @gs_parameters && @gs_parameters.count > 0 - if @sections - %table.table.table-striped - - @sections.each do |section| - %tr - %td{:colspan => 3} - %h3= section + - @sections.each do |section| + %h3= section + %table.table.table-striped -# Template Dependency: gs_parameters/_index_core = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - else -- cgit v1.2.3 From 42ee5557a5ac11743b573b25eb8fdb60c8c13aa3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 16:24:55 +0100 Subject: Use the copyright symbol. --- app/views/layouts/_footer.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 3d4658b..2703844 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -16,4 +16,4 @@ %li =link_to t('misc.send_a_bugreport'), URI::escape("https://github.com/amooma/GS5/issues/new?title=Bugreport&body=URL which triggered the bugreport is: #{request.fullpath}\nGS5 buildname: #{(GsParameter.get('GEMEINSCHAFT_BUILDNAME').blank? ? 'unknown' : GsParameter.get('GEMEINSCHAFT_BUILDNAME'))} (#{GsParameter.get('GEMEINSCHAFT_VERSION')})\n\nPlease provide your bugreport below this line and update the title of this issue to a more specific one.") %li{:class => 'pull-right'} - = link_to 'brought to you by AMOOMA GmbH', 'http://amooma.de' \ No newline at end of file + = link_to '© AMOOMA GmbH', 'http://amooma.de' \ No newline at end of file -- cgit v1.2.3 From da362f73cf417aa2eda9124d17c66850087ea0f6 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 16:52:24 +0100 Subject: Backup GUI improvements. --- app/views/backup_jobs/_index_core.html.haml | 34 +++++++++++++++++------ app/views/backup_jobs/show.html.haml | 4 ++- app/views/tenants/_admin_area.de.html.haml | 4 ++- app/views/tenants/_admin_area.en.html.haml | 4 ++- app/views/tenants/_table_of_backup_jobs.html.haml | 11 ++++++++ app/views/tenants/show.html.haml | 2 +- 6 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 app/views/tenants/_table_of_backup_jobs.html.haml (limited to 'app/views') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index 9eebefd..9dc0e92 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -1,12 +1,15 @@ %table.table.table-striped %tr %th= t('backup_jobs.index.started_at') - %th= t('backup_jobs.index.finished_at') + %th + %span.hidden-phone + = t('backup_jobs.index.finished_at') %th= t('backup_jobs.index.state') - %th= t('backup_jobs.index.size_of_the_backup') + %th + %span.hidden-phone + = t('backup_jobs.index.size_of_the_backup') %th{:colspan => '2'} - - for backup_job in backup_jobs - if backup_job.state == 'queued' - row_marker = 'warning' @@ -18,14 +21,29 @@ %tr{:class => row_marker} - if backup_job.finished_at.blank? %td{:colspan => '2'} - = time_ago_in_words(backup_job.started_at) + - if (Time.now - 1.day) > backup_job.started_at + = l backup_job.started_at, :format => :short + - else + - case I18n.locale + - when :de + = "vor #{time_ago_in_words(backup_job.started_at)}" + - when :en + = "#{time_ago_in_words(backup_job.started_at)} ago" + - else + = l backup_job.started_at, :format => :short - else %td = l backup_job.started_at, :format => :short %td - = l backup_job.finished_at, :format => :short + %span.hidden-phone + = l backup_job.finished_at, :format => :short %td= backup_job.state %td - - if backup_job.backup_file? - = number_to_human_size(backup_job.backup_file.size, :precision => 2) - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} \ No newline at end of file + %span.hidden-phone + - if backup_job.backup_file? + %a{:href => backup_job.backup_file.current_path} + %i{:class => 'icon-download'} + = number_to_human_size(backup_job.backup_file.size, :precision => 2) + - else + = '-' + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 5d85bbc..6c55320 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -15,6 +15,8 @@ %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - if @backup_job.backup_file? - = number_to_human_size(@backup_job.backup_file.size, :precision => 2) + %a{:href => backup_job.backup_file.current_path} + %i{:class => 'icon-download'} + = number_to_human_size(backup_job.backup_file.size, :precision => 2) = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job } \ No newline at end of file diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index 98809d1..2aed4e1 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -37,4 +37,6 @@ = render :partial => 'call_routes', :locals => {:tenant => tenant} - = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file + = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} + + = render :partial => 'table_of_backup_jobs', :locals => {:tenant => tenant, :backup_jobs => backup_jobs} diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index 4f0032c..8e7bfea 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -37,4 +37,6 @@ = render :partial => 'call_routes', :locals => {:tenant => tenant} - = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file + = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} + + = render :partial => 'table_of_backup_jobs', :locals => {:tenant => tenant, :backup_jobs => backup_jobs} \ No newline at end of file diff --git a/app/views/tenants/_table_of_backup_jobs.html.haml b/app/views/tenants/_table_of_backup_jobs.html.haml new file mode 100644 index 0000000..a585010 --- /dev/null +++ b/app/views/tenants/_table_of_backup_jobs.html.haml @@ -0,0 +1,11 @@ +-# BackupJobs +-# +- if (can?( :index, BackupJob ) && backup_jobs.count > 0 ) || can?( :create, BackupJob ) + - if backup_jobs.count == BackupJob.count + %h2= t('backup_jobs.index.page_title') + - else + %h2= t('backup_jobs.index.page_title_with_limit', :limit => '5') + + - if can?( :index, BackupJob ) && backup_jobs.count > 0 + = render "backup_jobs/index_core", :backup_jobs => backup_jobs + = render :partial => 'shared/create_link', :locals => {:child_class => BackupJob} \ No newline at end of file diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml index 818e584..23ec81a 100644 --- a/app/views/tenants/show.html.haml +++ b/app/views/tenants/show.html.haml @@ -15,4 +15,4 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @tenant } - if @tenant.user_groups.where(:name => 'Admins').any? && @tenant.user_groups.where(:name => 'Admins').first.users.include?(current_user) - = render :partial => 'admin_area', :locals => { :tenant => @tenant, :gateways => @gateways} \ No newline at end of file + = render :partial => 'admin_area', :locals => { :tenant => @tenant, :gateways => @gateways, :backup_jobs => @backup_jobs} \ No newline at end of file -- cgit v1.2.3 From 0ba495685589e99e1100af6d7af9d69ee4f40b78 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 16:59:15 +0100 Subject: Removed icons. --- app/views/layouts/_navbar.html.haml | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 335dd3d..7084090 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -21,11 +21,9 @@ - if current_user && current_user.sip_accounts.any? %li %a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)} - %i.icon-list-alt.icon-white =t("call_histories.index.page_title") %li %a{:href => sip_account_voicemail_messages_path(current_user.sip_accounts.first)} - %i.icon-volume-up.icon-white =t("voicemail_messages.index.page_title") - if current_user -- cgit v1.2.3 From b5cb8b7fa389c0a542825173b058dfcf428f6680 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 11 Feb 2013 17:44:09 +0100 Subject: Fix URL --- app/views/backup_jobs/_index_core.html.haml | 2 +- app/views/backup_jobs/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index 9dc0e92..0102546 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -41,7 +41,7 @@ %td %span.hidden-phone - if backup_job.backup_file? - %a{:href => backup_job.backup_file.current_path} + %a{:href => backup_job.backup_file.url} %i{:class => 'icon-download'} = number_to_human_size(backup_job.backup_file.size, :precision => 2) - else diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 6c55320..6fcb1dc 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -15,7 +15,7 @@ %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - if @backup_job.backup_file? - %a{:href => backup_job.backup_file.current_path} + %a{:href => backup_job.backup_file.url} %i{:class => 'icon-download'} = number_to_human_size(backup_job.backup_file.size, :precision => 2) -- cgit v1.2.3 From b7e6ceb34069756d72c5debafff65f091b636b7d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 12 Feb 2013 09:57:53 +0100 Subject: Use short I18n format for displaying the datetime. --- app/views/call_histories/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 4ca340d..8bbf761 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -22,7 +22,7 @@ - phone_book_entry = call_history.phone_book_entry_by_number(call_history.display_number) %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')} %td - = l call_history.start_stamp, :format => :date_only + = l call_history.start_stamp, :format => :short %td = l call_history.start_stamp, :format => :short %td -- cgit v1.2.3 From 155403327d0a4915a26aaf2f0b9e390b7e8fdb64 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 12 Feb 2013 12:23:30 +0100 Subject: Changed to if GsParameter.get('PROVISIONING_KEY_LENGTH') == 0 --- app/views/phones/_form_core.html.haml | 2 +- app/views/phones/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index 17b9ca8..31f3c24 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -11,5 +11,5 @@ - if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true = f.input :nightly_reboot, :label => t('phones.form.nightly_reboot.label'), :hint => conditional_hint('phones.form.nightly_reboot.hint') - - if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 + - if GsParameter.get('PROVISIONING_KEY_LENGTH') == 0 = f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 86ac380..e9b8b21 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -34,7 +34,7 @@ %td = @phone.nightly_reboot == true ? t('simple_form.yes') : t('simple_form.no') - - if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 + - if GsParameter.get('PROVISIONING_KEY_LENGTH') == 0 %tr %td %strong= t('phones.show.provisioning_key_active') + ":" -- cgit v1.2.3 From aa5a2b806d117ffde9888e282c7100066156d94b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 12 Feb 2013 12:46:36 +0100 Subject: Misc I18n and GUI improvements. --- app/views/call_routes/show.html.haml | 47 +++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'app/views') diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml index a33a29b..998558e 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -1,26 +1,33 @@ - content_for :title, t("call_routes.show.page_title") -%p - %strong= t('call_routes.show.position') + ":" - = @call_route.position -%p - %strong= t('call_routes.show.table') + ":" - = @call_route.routing_table -%p - %strong= t('call_routes.show.name') + ":" - = @call_route.name -%p - %strong= t('call_routes.show.endpoint') + ":" - - endpoint = @call_route.endpoint - - if endpoint - = endpoint - - else - = @call_route.endpoint_type +.row + .span5 + %table.table.table-striped + %tr + %td + %strong= t('call_routes.show.table') + ":" + %td + = @call_route.routing_table + %tr + %td + %strong= t('call_routes.show.name') + ":" + %td + = @call_route.name + %tr + %td + %strong= t('call_routes.show.endpoint') + ":" + %td + - if @call_route.endpoint.blank? + = @call_route.endpoint_type + - else + = @call_route.endpoint = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } -%h3= t('route_elements.index.page_title') -- if @call_route.route_elements && @call_route.route_elements.count > 0 - = render "route_elements/index_core", :route_elements => @call_route.route_elements +.row + .span12 + %h3= t('route_elements.index.page_title') + - if @call_route.route_elements && @call_route.route_elements.count > 0 + = render "route_elements/index_core", :route_elements => @call_route.route_elements -= render :partial => 'shared/create_link', :locals => { :parent => @call_route, :child_class => RouteElement } + = render :partial => 'shared/create_link', :locals => { :parent => @call_route, :child_class => RouteElement } -- cgit v1.2.3 From f8f35f666613eff24d3988bda1a22cc40ef2ab30 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 12 Feb 2013 13:26:30 +0100 Subject: Make the call_elements table sortable by drag and drop. --- app/views/call_routes/show.html.haml | 2 +- app/views/route_elements/_form_core.html.haml | 1 - app/views/route_elements/_index_core.html.haml | 12 ++++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml index 998558e..7c695c8 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -22,7 +22,7 @@ - else = @call_route.endpoint -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } + = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } .row .span12 diff --git a/app/views/route_elements/_form_core.html.haml b/app/views/route_elements/_form_core.html.haml index d22467e..a9a38a7 100644 --- a/app/views/route_elements/_form_core.html.haml +++ b/app/views/route_elements/_form_core.html.haml @@ -4,5 +4,4 @@ = f.input :pattern, :label => t('route_elements.form.pattern.label'), :hint => conditional_hint('route_elements.form.pattern.hint') = f.input :replacement, :label => t('route_elements.form.replacement.label'), :hint => conditional_hint('route_elements.form.replacement.hint') = f.input :action, :collection => RouteElement::ELEMENT_ACTIONS, :label => t('route_elements.form.action.label'), :hint => conditional_hint('route_elements.form.action.hint'), :include_blank => false - = f.input :position, :label => t('route_elements.form.position.label'), :hint => conditional_hint('route_elements.form.position.hint') = f.input :mandatory, :label => t('route_elements.form.mandatory.label'), :hint => conditional_hint('route_elements.form.mandatory.hint') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index f68a9ba..a88602f 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -1,7 +1,8 @@ %table.table.table-striped %thead %tr - %th + - if route_elements.count > 1 + %th %th= t('route_elements.index.var_in') %th= t('route_elements.index.var_out') %th= t('route_elements.index.pattern') @@ -9,10 +10,13 @@ %th= t('route_elements.index.action') %th= t('route_elements.index.mandatory') - %tbody + %tbody{ :id => "route_elements", :'data-update-url' => sort_call_route_route_elements_url(route_elements.first.call_route)} - for route_element in route_elements - %tr - %td= route_element.position + = content_tag_for :tr, route_element do + - if route_elements.count > 1 + %td + %span.handle + %i.icon-resize-vertical %td= route_element.var_in %td= route_element.var_out %td= route_element.pattern -- cgit v1.2.3 From fb66a5e5a4c5d5f9eac4a5e8de6a286482cb55d5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 12 Feb 2013 13:41:13 +0100 Subject: Some span.hidden-phone stuff to improve the UI on a phone. --- app/views/route_elements/_index_core.html.haml | 40 ++++++++++++++----- app/views/route_elements/show.html.haml | 54 ++++++++++++++++---------- 2 files changed, 63 insertions(+), 31 deletions(-) (limited to 'app/views') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index a88602f..b7d2bc1 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -3,12 +3,22 @@ %tr - if route_elements.count > 1 %th - %th= t('route_elements.index.var_in') - %th= t('route_elements.index.var_out') + %th + %span.hidden-phone + = t('route_elements.index.var_in') + %th + %span.hidden-phone + = t('route_elements.index.var_out') %th= t('route_elements.index.pattern') - %th= t('route_elements.index.replacement') - %th= t('route_elements.index.action') - %th= t('route_elements.index.mandatory') + %th + %span.hidden-phone + = t('route_elements.index.replacement') + %th + %span.hidden-phone + = t('route_elements.index.action') + %th + %span.hidden-phone + = t('route_elements.index.mandatory') %tbody{ :id => "route_elements", :'data-update-url' => sort_call_route_route_elements_url(route_elements.first.call_route)} - for route_element in route_elements @@ -17,10 +27,20 @@ %td %span.handle %i.icon-resize-vertical - %td= route_element.var_in - %td= route_element.var_out + %td + %span.hidden-phone + = route_element.var_in + %td + %span.hidden-phone + = route_element.var_out %td= route_element.pattern - %td= route_element.replacement - %td= route_element.action - %td= route_element.mandatory + %td + %span.hidden-phone + = route_element.replacement + %td + %span.hidden-phone + = route_element.action + %td + %span.hidden-phone + = route_element.mandatory =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @call_route, :child => route_element} \ No newline at end of file diff --git a/app/views/route_elements/show.html.haml b/app/views/route_elements/show.html.haml index 1d07cbc..937df5e 100644 --- a/app/views/route_elements/show.html.haml +++ b/app/views/route_elements/show.html.haml @@ -1,25 +1,37 @@ - content_for :title, t("route_elements.show.page_title") -%p - %strong= t('route_elements.show.position') + ":" - = @route_element.position -%p - %strong= t('route_elements.show.var_in') + ":" - = @route_element.var_in -%p - %strong= t('route_elements.show.var_out') + ":" - = @route_element.var_out -%p - %strong= t('route_elements.show.pattern') + ":" - = @route_element.pattern -%p - %strong= t('route_elements.show.replacement') + ":" - = @route_element.replacement -%p - %strong= t('route_elements.show.action') + ":" - = @route_element.action -%p - %strong= t('route_elements.show.mandatory') + ":" - = @route_element.mandatory +.row + .span6 + %table.table.table-striped + %tr + %td + %strong= t('route_elements.show.var_in') + ":" + %td + = @route_element.var_in + %tr + %td + %strong= t('route_elements.show.var_out') + ":" + %td + = @route_element.var_out + %tr + %td + %strong= t('route_elements.show.pattern') + ":" + %td + = @route_element.pattern + %tr + %td + %strong= t('route_elements.show.replacement') + ":" + %td + = @route_element.replacement + %tr + %td + %strong= t('route_elements.show.action') + ":" + %td + = @route_element.action + %tr + %td + %strong= t('route_elements.show.mandatory') + ":" + %td + = @route_element.mandatory = render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @call_route, :child => @route_element } \ No newline at end of file -- cgit v1.2.3