summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-02-12 13:07:17 +0000
committerPeter Kozak <spag@golwen.net>2013-02-12 13:07:17 +0000
commit1abd4544ad482079765be838dd6819e9997af9ac (patch)
tree6aa9c0f6e9ba2ee03e509a9858dc43cbafb25db6 /app/views
parent902447a1baf7e9d8385c269a601361c8c3f2f14b (diff)
parentfb66a5e5a4c5d5f9eac4a5e8de6a286482cb55d5 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/views')
-rw-r--r--app/views/call_routes/show.html.haml49
-rw-r--r--app/views/phones/_form_core.html.haml2
-rw-r--r--app/views/phones/show.html.haml2
-rw-r--r--app/views/route_elements/_form_core.html.haml1
-rw-r--r--app/views/route_elements/_index_core.html.haml50
-rw-r--r--app/views/route_elements/show.html.haml54
6 files changed, 100 insertions, 58 deletions
diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml
index a33a29b..7c695c8 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 }
+ = 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 }
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') + ":"
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..b7d2bc1 100644
--- a/app/views/route_elements/_index_core.html.haml
+++ b/app/views/route_elements/_index_core.html.haml
@@ -1,22 +1,46 @@
%table.table.table-striped
%thead
%tr
+ - if route_elements.count > 1
+ %th
%th
- %th= t('route_elements.index.var_in')
- %th= t('route_elements.index.var_out')
+ %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
+ %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
- %td= route_element.var_in
- %td= route_element.var_out
+ = content_tag_for :tr, route_element do
+ - if route_elements.count > 1
+ %td
+ %span.handle
+ %i.icon-resize-vertical
+ %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