diff options
| author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
|---|---|---|
| committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
| commit | eb0e1cc5c26275ff3e5c341404e8bc558f8312b8 (patch) | |
| tree | 71f449ccd6f15422717de3ac24f87d5e888ddd79 /app/views/switchboards | |
| parent | df6e17e48995f25e72509986f30700d778b179b6 (diff) | |
| parent | 3b27a5d45b12f6bac65da2a8e17387bfda42a2f1 (diff) | |
Merge branch 'develop'
Diffstat (limited to 'app/views/switchboards')
| -rw-r--r-- | app/views/switchboards/_form_core.html.haml | 4 | ||||
| -rw-r--r-- | app/views/switchboards/show-old.html.haml (renamed from app/views/switchboards/show.html.haml) | 0 | ||||
| -rw-r--r-- | app/views/switchboards/show.html.erb | 79 |
3 files changed, 83 insertions, 0 deletions
diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml index 61b5934..2258640 100644 --- a/app/views/switchboards/_form_core.html.haml +++ b/app/views/switchboards/_form_core.html.haml @@ -1,2 +1,6 @@ .inputs = f.input :name, :label => t('switchboards.form.name.label'), :hint => conditional_hint('switchboards.form.name.hint'), :autofocus => true + = f.input :reload_interval, :label => t('switchboards.form.reload_interval.label'), :hint => conditional_hint('switchboards.form.reload_interval.hint') + = f.input :show_avatars, :label => t('switchboards.form.show_avatars.label'), :hint => conditional_hint('switchboards.form.show_avatars.hint') + = f.input :entry_width, :label => t('switchboards.form.entry_width.label'), :hint => conditional_hint('switchboards.form.entry_width.hint') + = 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')
\ No newline at end of file diff --git a/app/views/switchboards/show.html.haml b/app/views/switchboards/show-old.html.haml index a825806..a825806 100644 --- a/app/views/switchboards/show.html.haml +++ b/app/views/switchboards/show-old.html.haml diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb new file mode 100644 index 0000000..2a2765f --- /dev/null +++ b/app/views/switchboards/show.html.erb @@ -0,0 +1,79 @@ +<% content_for :title, "Switchboard #{@switchboard.name}" %> + +<script> + var switchboard_id = <%= @switchboard.id %>; + var show_avatars = <%= @switchboard.show_avatars.to_s %>; + var reload_interval = <%= @switchboard.reload_interval.nil? ? 0 : @switchboard.reload_interval %>; + var amount_of_displayed_phone_numbers = <%= @switchboard.amount_of_displayed_phone_numbers %>; +</script> + +<div class='row'> + <div class='span12'> + <div id='emberjs-container'></div> + + <script type="text/x-handlebars"> + {{outlet}} + </script> + + <script type="text/x-handlebars" data-template-name="switchboard"> + <h2>{{name}}</h2> + + {{#if switchboardEntrys.length}} + <ul class="thumbnails"> + {{#each switchboardEntry in switchboardEntrys}} + <li class="span2"> + <div class="thumbnail"> + {{avatar_img switchboardEntry.avatar_src}} + <small> + <p> + <span class="label">{{switchboardEntry.name}}</span> + + {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}} + <span class="label"> + {{phoneNumber.number}} + </span> + {{/each}} + </p> + + {{show_callstate switchboardEntry.callstate}} + {{#if switchboardEntry.sipAccount.calls.length}} + <p> + Anrufe: + <br> + {{#each call in switchboardEntry.sipAccount.calls}} + <span {{bindAttr class=":label call.isActive:label-success"}}> + {{call.b_caller_id_number}} -> {{call.destination}} + {{#if call.isActive}} + * + {{/if}} + </span> + {{/each}} + </p> + {{/if}} + + {{#if activeCalls.length}} + <p> + Verbinden mit: + <br> + {{#each activeCall in activeCalls}} + <button {{action blind_transfer}}> + {{activeCall.b_caller_id_number}} + </button> + {{/each}} + </p> + {{/if}} + </small> + </div> + </li> + {{/each}} + </ul> + {{/if}} + </script> + + </div> +</div> + +<script src="/js/libs/handlebars.js"></script> +<script src="/js/libs/ember.js"></script> +<script src="/js/libs/ember-data.js"></script> +<script src="/js/app.js"></script> |
