diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:05:14 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:05:14 +0100 |
commit | eaad37485fe59d0306c37cc038dda6d210052910 (patch) | |
tree | 072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/acd_agents | |
parent | 3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff) | |
parent | b80bd744ad873f6fc43018bc4bfb90677de167bd (diff) |
Merge branch 'develop'
Diffstat (limited to 'app/views/acd_agents')
-rw-r--r-- | app/views/acd_agents/_form.html.haml | 7 | ||||
-rw-r--r-- | app/views/acd_agents/_form_core.html.haml | 7 | ||||
-rw-r--r-- | app/views/acd_agents/_index_core.html.haml | 18 | ||||
-rw-r--r-- | app/views/acd_agents/_listing.html.haml | 8 | ||||
-rw-r--r-- | app/views/acd_agents/edit.html.haml | 3 | ||||
-rw-r--r-- | app/views/acd_agents/index.html.haml | 6 | ||||
-rw-r--r-- | app/views/acd_agents/new.html.haml | 3 | ||||
-rw-r--r-- | app/views/acd_agents/show.html.haml | 28 |
8 files changed, 80 insertions, 0 deletions
diff --git a/app/views/acd_agents/_form.html.haml b/app/views/acd_agents/_form.html.haml new file mode 100644 index 0000000..3b78bac --- /dev/null +++ b/app/views/acd_agents/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@automatic_call_distributor, @acd_agent]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('acd_agents.form.submit')
\ No newline at end of file diff --git a/app/views/acd_agents/_form_core.html.haml b/app/views/acd_agents/_form_core.html.haml new file mode 100644 index 0000000..ab4657c --- /dev/null +++ b/app/views/acd_agents/_form_core.html.haml @@ -0,0 +1,7 @@ +.inputs + = f.input :name, :label => t('acd_agents.form.name.label'), :hint => conditional_hint('acd_agents.form.name.hint') + = f.input :status, :label => t('acd_agents.form.status.label'), :hint => conditional_hint('acd_agents.form.status.hint'), :include_blank => false, :collection => AcdAgent::STATUSES + = f.input :last_call, :label => t('acd_agents.form.last_call.label'), :hint => conditional_hint('acd_agents.form.last_call.hint') + = f.input :calls_answered, :label => t('acd_agents.form.calls_answered.label'), :hint => conditional_hint('acd_agents.form.calls_answered.hint') + = f.input :destination_type, :label => t('acd_agents.form.destination_type.label'), :hint => conditional_hint('acd_agents.form.destination_type.hint'), :include_blank => false, :collection => AcdAgent::DESTINATION_TYPES + = f.input :destination_id, :label => t('acd_agents.form.destination_id.label'), :hint => conditional_hint('acd_agents.form.destination_id.hint') diff --git a/app/views/acd_agents/_index_core.html.haml b/app/views/acd_agents/_index_core.html.haml new file mode 100644 index 0000000..7cb1aae --- /dev/null +++ b/app/views/acd_agents/_index_core.html.haml @@ -0,0 +1,18 @@ +%table + %tr + %th= t('acd_agents.index.name') + %th= t('acd_agents.index.status') + %th= t('acd_agents.index.last_call') + %th= t('acd_agents.index.calls_answered') + %th= t('acd_agents.index.destination') + + - reset_cycle + - for acd_agent in acd_agents + %tr{:class => cycle('odd', 'even')} + %td= acd_agent.name + %td= acd_agent.status + %td= acd_agent.last_call + %td= acd_agent.calls_answered + %td= acd_agent.destination + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => acd_agent.automatic_call_distributor, :child => acd_agent} +
\ No newline at end of file diff --git a/app/views/acd_agents/_listing.html.haml b/app/views/acd_agents/_listing.html.haml new file mode 100644 index 0000000..0495ec2 --- /dev/null +++ b/app/views/acd_agents/_listing.html.haml @@ -0,0 +1,8 @@ +- amount_of_acd_agents = acd_agents.count +- if amount_of_acd_agents > 0 + - if amount_of_acd_agents < 30 + = acd_agents.map{|acd_agent| acd_agent}.join(', ') + - else + = acd_agents.limit(15).map{|acd_agent| acd_agent}.join(', ') + ', ' + = '[...]' + = acd_agents.offset(amount_of_acd_agents - 15).map{|acd_agent| acd_agent}.join(', ')
\ No newline at end of file diff --git a/app/views/acd_agents/edit.html.haml b/app/views/acd_agents/edit.html.haml new file mode 100644 index 0000000..8ab14b8 --- /dev/null +++ b/app/views/acd_agents/edit.html.haml @@ -0,0 +1,3 @@ +- title t("acd_agents.edit.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/acd_agents/index.html.haml b/app/views/acd_agents/index.html.haml new file mode 100644 index 0000000..d586dcf --- /dev/null +++ b/app/views/acd_agents/index.html.haml @@ -0,0 +1,6 @@ +- title t("acd_agents.index.page_title") + +- if @acd_agents && @acd_agents.count > 0 + = render "index_core", :acd_agents => @acd_agents + += render :partial => 'shared/create_link', :locals => {:parent => @automatic_call_distributor, :child_class => AcdAgent} diff --git a/app/views/acd_agents/new.html.haml b/app/views/acd_agents/new.html.haml new file mode 100644 index 0000000..546136b --- /dev/null +++ b/app/views/acd_agents/new.html.haml @@ -0,0 +1,3 @@ +- title t("acd_agents.new.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/acd_agents/show.html.haml b/app/views/acd_agents/show.html.haml new file mode 100644 index 0000000..97881f6 --- /dev/null +++ b/app/views/acd_agents/show.html.haml @@ -0,0 +1,28 @@ +- title t("acd_agents.show.page_title") + +%p + %strong= t('acd_agents.show.uuid') + ":" + = @acd_agent.uuid +%p + %strong= t('acd_agents.show.name') + ":" + = @acd_agent.name +%p + %strong= t('acd_agents.show.status') + ":" + = @acd_agent.status +%p + %strong= t('acd_agents.show.automatic_call_distributor_id') + ":" + = @acd_agent.automatic_call_distributor_id +%p + %strong= t('acd_agents.show.last_call') + ":" + = @acd_agent.last_call +%p + %strong= t('acd_agents.show.calls_answered') + ":" + = @acd_agent.calls_answered +%p + %strong= t('acd_agents.show.destination_type') + ":" + = @acd_agent.destination_type +%p + %strong= t('acd_agents.show.destination_id') + ":" + = @acd_agent.destination_id + += render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @automatic_call_distributor, :child => @acd_agent }
\ No newline at end of file |