summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-15 14:49:16 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-15 14:49:16 +0100
commit3d11d0a3a047a12bfd40b61252e269cabac76225 (patch)
treec16baf628633205b2e664f86f2e0038f3ee3b097 /app/views
parent124a421b19e08447fa790b65cc969dadd7408539 (diff)
Basic structure for sim_cards and sim_card_providers.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/sim_card_providers/_form.html.haml7
-rw-r--r--app/views/sim_card_providers/_form_core.html.haml9
-rw-r--r--app/views/sim_card_providers/_index_core.html.haml21
-rw-r--r--app/views/sim_card_providers/edit.html.haml3
-rw-r--r--app/views/sim_card_providers/index.html.haml6
-rw-r--r--app/views/sim_card_providers/new.html.haml3
-rw-r--r--app/views/sim_card_providers/show.html.haml72
-rw-r--r--app/views/sim_cards/_form.html.haml7
-rw-r--r--app/views/sim_cards/_form_core.html.haml3
-rw-r--r--app/views/sim_cards/_index_core.html.haml16
-rw-r--r--app/views/sim_cards/edit.html.haml3
-rw-r--r--app/views/sim_cards/index.html.haml6
-rw-r--r--app/views/sim_cards/new.html.haml3
-rw-r--r--app/views/sim_cards/show.html.haml32
-rw-r--r--app/views/tenants/_admin_area.de.html.haml3
-rw-r--r--app/views/tenants/_admin_area.en.html.haml3
-rw-r--r--app/views/tenants/_table_of_sim_card_providers.html.haml7
-rw-r--r--app/views/users/show.html.haml3
18 files changed, 207 insertions, 0 deletions
diff --git a/app/views/sim_card_providers/_form.html.haml b/app/views/sim_card_providers/_form.html.haml
new file mode 100644
index 0000000..73953e0
--- /dev/null
+++ b/app/views/sim_card_providers/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@sim_card_provider) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('sim_card_providers.form.submit')
diff --git a/app/views/sim_card_providers/_form_core.html.haml b/app/views/sim_card_providers/_form_core.html.haml
new file mode 100644
index 0000000..fc36579
--- /dev/null
+++ b/app/views/sim_card_providers/_form_core.html.haml
@@ -0,0 +1,9 @@
+.inputs
+ = f.input :name, :label => t('sim_card_providers.form.name.label'), :hint => conditional_hint('sim_card_providers.form.name.hint')
+ = f.input :homepage_url, :label => t('sim_card_providers.form.homepage_url.label'), :hint => conditional_hint('sim_card_providers.form.homepage_url.hint')
+ = f.input :docu_url, :label => t('sim_card_providers.form.docu_url.label'), :hint => conditional_hint('sim_card_providers.form.docu_url.hint')
+ = f.input :api_server_url, :label => t('sim_card_providers.form.api_server_url.label'), :hint => conditional_hint('sim_card_providers.form.api_server_url.hint')
+ = f.input :api_username, :label => t('sim_card_providers.form.api_username.label'), :hint => conditional_hint('sim_card_providers.form.api_username.hint')
+ = f.input :api_password, :label => t('sim_card_providers.form.api_password.label'), :hint => conditional_hint('sim_card_providers.form.api_password.hint')
+ = f.input :sip_server, :label => t('sim_card_providers.form.sip_server.label'), :hint => conditional_hint('sim_card_providers.form.sip_server.hint')
+ = f.input :include_order_card_function, :label => t('sim_card_providers.form.include_order_card_function.label'), :hint => conditional_hint('sim_card_providers.form.include_order_card_function.hint')
diff --git a/app/views/sim_card_providers/_index_core.html.haml b/app/views/sim_card_providers/_index_core.html.haml
new file mode 100644
index 0000000..6a24695
--- /dev/null
+++ b/app/views/sim_card_providers/_index_core.html.haml
@@ -0,0 +1,21 @@
+%table.table.table-striped
+ %tr
+ %th= t('sim_card_providers.index.name')
+ %th= t('sim_card_providers.index.api_server_url')
+ %th= t('sim_card_providers.index.api_username')
+ %th= t('sim_card_providers.index.api_password')
+ %th= t('sim_card_providers.index.sip_server')
+ %th
+
+ - for sim_card_provider in sim_card_providers
+ %tr
+ %td
+ - if sim_card_provider.homepage_url.blank?
+ = sim_card_provider.name
+ - else
+ = link_to sim_card_provider.name, sim_card_provider.homepage_url
+ %td= sim_card_provider.api_server_url
+ %td= sim_card_provider.api_username
+ %td= sim_card_provider.api_password
+ %td= sim_card_provider.sip_server
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => sim_card_provider} \ No newline at end of file
diff --git a/app/views/sim_card_providers/edit.html.haml b/app/views/sim_card_providers/edit.html.haml
new file mode 100644
index 0000000..49b1f93
--- /dev/null
+++ b/app/views/sim_card_providers/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("sim_card_providers.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/sim_card_providers/index.html.haml b/app/views/sim_card_providers/index.html.haml
new file mode 100644
index 0000000..2264e53
--- /dev/null
+++ b/app/views/sim_card_providers/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("sim_card_providers.index.page_title")
+
+- if @sim_card_providers && @sim_card_providers.count > 0
+ = render "index_core", :sim_card_providers => @sim_card_providers
+
+= render :partial => 'shared/create_link', :locals => {:child_class => SimCardProvider} \ No newline at end of file
diff --git a/app/views/sim_card_providers/new.html.haml b/app/views/sim_card_providers/new.html.haml
new file mode 100644
index 0000000..04c0445
--- /dev/null
+++ b/app/views/sim_card_providers/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("sim_card_providers.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/sim_card_providers/show.html.haml b/app/views/sim_card_providers/show.html.haml
new file mode 100644
index 0000000..37635d9
--- /dev/null
+++ b/app/views/sim_card_providers/show.html.haml
@@ -0,0 +1,72 @@
+- content_for :title, t("sim_card_providers.show.page_title")
+
+.row
+ .span6
+ %table.table.table-striped
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.name') + ":"
+ %td
+ = @sim_card_provider.name
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.homepage_url') + ":"
+ %td
+ = @sim_card_provider.homepage_url
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.docu_url') + ":"
+ %td
+ = @sim_card_provider.docu_url
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.api_server_url') + ":"
+ %td
+ = @sim_card_provider.api_server_url
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.api_username') + ":"
+ %td
+ = @sim_card_provider.api_username
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.api_password') + ":"
+ %td
+ = @sim_card_provider.api_password
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.ref') + ":"
+ %td
+ = @sim_card_provider.ref
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.sip_server') + ":"
+ %td
+ = @sim_card_provider.sip_server
+ %tr
+ %td
+ %strong= t('sim_card_providers.show.include_order_card_function') + ":"
+ %td
+ = @sim_card_provider.include_order_card_function
+
+ = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @sim_card_provider }
+
+.row
+ .span12
+ %h2= t("sim_cards.index.page_title")
+
+ %table.table.table-striped
+ %tr
+ %th= t('sim_cards.index.sip_account_id')
+ %th= t('sim_cards.index.auth_key')
+ %th= t('sim_cards.index.state')
+ %th
+
+ - for sim_card in @sim_card_provider.sim_cards
+ %tr
+ %td= sim_card.sip_account
+ %td= sim_card.auth_key
+ %td= sim_card.state
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @sim_card_provider, :child => sim_card}
+
+ = render :partial => 'shared/create_link', :locals => {:parent => @sim_card_provider, :child_class => SimCard} \ No newline at end of file
diff --git a/app/views/sim_cards/_form.html.haml b/app/views/sim_cards/_form.html.haml
new file mode 100644
index 0000000..7d3cfbe
--- /dev/null
+++ b/app/views/sim_cards/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@sim_card_provider, @sim_card]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('sim_cards.form.submit')
diff --git a/app/views/sim_cards/_form_core.html.haml b/app/views/sim_cards/_form_core.html.haml
new file mode 100644
index 0000000..7cba4e9
--- /dev/null
+++ b/app/views/sim_cards/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :sim_number, :label => t('sim_cards.form.sim_number.label'), :hint => conditional_hint('sim_cards.form.sim_number.hint')
+ = f.association :sip_account, :collection => @available_sip_accounts, :label => t('phone_sip_accounts.form.sip_account_id.label'), :hint => conditional_hint('phone_sip_accounts.form.sip_account_id.hint'), :include_blank => false \ No newline at end of file
diff --git a/app/views/sim_cards/_index_core.html.haml b/app/views/sim_cards/_index_core.html.haml
new file mode 100644
index 0000000..c36b22b
--- /dev/null
+++ b/app/views/sim_cards/_index_core.html.haml
@@ -0,0 +1,16 @@
+%table.table.table-striped
+ %tr
+ %th= t('sim_cards.index.sip_account_id')
+ %th= t('sip_accounts.index.phone_numbers')
+ %th= t('sim_cards.index.auth_key')
+ %th= t('sim_cards.index.state')
+ %th
+
+ - for sim_card in sim_cards
+ %tr
+ %td= sim_card.sip_account
+ %td
+ = render 'phone_numbers/listing', :phone_numbers => sim_card.sip_account.phone_numbers.order(:number)
+ %td= sim_card.auth_key
+ %td= sim_card.state
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @parent, :child => sim_card} \ No newline at end of file
diff --git a/app/views/sim_cards/edit.html.haml b/app/views/sim_cards/edit.html.haml
new file mode 100644
index 0000000..97ee10e
--- /dev/null
+++ b/app/views/sim_cards/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("sim_cards.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/sim_cards/index.html.haml b/app/views/sim_cards/index.html.haml
new file mode 100644
index 0000000..803bd72
--- /dev/null
+++ b/app/views/sim_cards/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("sim_cards.index.page_title")
+
+- if @sim_cards && @sim_cards.count > 0
+ = render "index_core", :sim_cards => @sim_cards
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => SimCard} \ No newline at end of file
diff --git a/app/views/sim_cards/new.html.haml b/app/views/sim_cards/new.html.haml
new file mode 100644
index 0000000..1eef168
--- /dev/null
+++ b/app/views/sim_cards/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("sim_cards.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/sim_cards/show.html.haml b/app/views/sim_cards/show.html.haml
new file mode 100644
index 0000000..88822f1
--- /dev/null
+++ b/app/views/sim_cards/show.html.haml
@@ -0,0 +1,32 @@
+- content_for :title, t("sim_cards.show.page_title")
+
+.row
+ .span6
+ %table.table.table-striped
+ %tr
+ %td
+ %strong= t('sim_cards.show.sip_account_id') + ":"
+ %td
+ = @sim_card.sip_account
+ %tr
+ %td
+ %strong= t('sip_accounts.index.phone_numbers')
+ %td
+ = render 'phone_numbers/listing', :phone_numbers => @sim_card.sip_account.phone_numbers.order(:number)
+ %tr
+ %td
+ %strong= t('sim_cards.show.auth_key') + ":"
+ %td
+ = @sim_card.auth_key
+ %tr
+ %td
+ %strong= t('sim_cards.show.state') + ":"
+ %td
+ = @sim_card.state
+ %tr
+ %td
+ %strong= t('sim_cards.show.log') + ":"
+ %td
+ = @sim_card.log
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @parent, :child => @sim_card } \ 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 2aed4e1..8acc95d 100644
--- a/app/views/tenants/_admin_area.de.html.haml
+++ b/app/views/tenants/_admin_area.de.html.haml
@@ -35,6 +35,9 @@
= succeed '.' do
=link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+ - if GsParameter.get('SIM_CARDS') == true
+ = render :partial => 'tenants/table_of_sim_card_providers'
+
= render :partial => 'call_routes', :locals => {:tenant => tenant}
= render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways}
diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml
index 8e7bfea..c40e3ca 100644
--- a/app/views/tenants/_admin_area.en.html.haml
+++ b/app/views/tenants/_admin_area.en.html.haml
@@ -35,6 +35,9 @@
= succeed '.' do
=link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+ - if GsParameter.get('SIM_CARDS') == true
+ = render :partial => 'tenants/table_of_sim_card_providers'
+
= render :partial => 'call_routes', :locals => {:tenant => tenant}
= render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways}
diff --git a/app/views/tenants/_table_of_sim_card_providers.html.haml b/app/views/tenants/_table_of_sim_card_providers.html.haml
new file mode 100644
index 0000000..135bb65
--- /dev/null
+++ b/app/views/tenants/_table_of_sim_card_providers.html.haml
@@ -0,0 +1,7 @@
+- cache(['tenant_show_table_of_sim_card_providers', I18n.locale, SimCardProvider.count, SimCardProvider.reorder(:updated_at).last]) do
+ -# SIM card providers
+ -#
+ %h2= t('sim_card_providers.index.page_title')
+ - if SimCardProvider.any?
+ = render "sim_card_providers/index_core", :sim_card_providers => SimCardProvider.all
+ = render :partial => 'shared/create_link', :locals => {:child_class => SimCardProvider}
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index c63c791..ba38547 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -67,6 +67,9 @@
- cache(['user_show_phones_overview', I18n.locale, @user, @user.phones]) do
= render :partial => 'phones', :locals => {:user => @user}
+ / - cache(['user_show_sim_cards_overview', I18n.locale, @user, @user.phones]) do
+ / = render :partial => 'phones', :locals => {:user => @user}
+
- cache(['user_show_fax_accounts_overview', I18n.locale, @user, @user.fax_accounts]) do
= render :partial => 'fax_accounts', :locals => {:user => @user}