summaryrefslogtreecommitdiff
path: root/app/views/switchboards
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-27 20:58:33 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-27 20:58:33 +0200
commitaad51572a6c75a4cbd2d44804b82f634a4ddd732 (patch)
treeeb1e50afb7f8667fc6d5ac4a856c5f1fd396efd7 /app/views/switchboards
parent29213546a4468aa4a853dee8091bbd556f7d0f51 (diff)
Add the possiblity to search the phone_books in the Switchboard#view
Diffstat (limited to 'app/views/switchboards')
-rw-r--r--app/views/switchboards/_form_core.html.haml1
-rw-r--r--app/views/switchboards/show.html.erb29
2 files changed, 30 insertions, 0 deletions
diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml
index a4fd15f..0bfcb86 100644
--- a/app/views/switchboards/_form_core.html.haml
+++ b/app/views/switchboards/_form_core.html.haml
@@ -6,3 +6,4 @@
= f.input :amount_of_displayed_phone_numbers, :label => t('switchboards.form.amount_of_displayed_phone_numbers.label'), :hint => conditional_hint('switchboards.form.amount_of_displayed_phone_numbers.hint')
= f.input :blind_transfer_activated, :label => t('switchboards.form.blind_transfer_activated.label'), :hint => conditional_hint('switchboards.form.blind_transfer_activated.hint')
= f.input :attended_transfer_activated, :label => t('switchboards.form.attended_transfer_activated.label'), :hint => conditional_hint('switchboards.form.attended_transfer_activated.hint')
+ = f.input :search_activated, :label => t('switchboards.form.search_activated.label'), :hint => conditional_hint('switchboards.form.search_activated.hint') \ No newline at end of file
diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb
index 3bc4da4..b2cdbd4 100644
--- a/app/views/switchboards/show.html.erb
+++ b/app/views/switchboards/show.html.erb
@@ -26,6 +26,35 @@
{{/each}}
{{/if}}
+ {{#if search_activated}}
+ <div class="well span3 pull-right">
+ <p>
+ {{input type="text" value=searchText size="10" placeholder="Suchen..."}}
+ </p>
+ <ul>
+ {{#each phoneBookEntry in searchResults}}
+ <li>
+ {{phoneBookEntry.search_result_display}}<br />
+
+ {{#each phoneNumber in phoneBookEntry.phoneNumbers}}
+ <span class="label">
+ {{phoneNumber.number}}
+ </span>
+
+ {{#each dispatchableIncomingCall in dispatchableIncomingCalls}}
+ {{#if blind_transfer_activated}}
+ <button {{action transfer_blind dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Transfer</button>
+ {{/if}}
+ {{#if attended_transfer_activated}}
+ <button {{action transfer_attended dispatchableIncomingCall.id phoneNumber.number}} class="btn btn-small">Attended Transfer</button>
+ {{/if}}
+ {{/each}}
+ {{/each}}
+ </li>
+ {{/each}}
+ </ul>
+ </div>
+ {{/if}}
{{#if switchboardEntrys.length}}
<ul class="thumbnails">