summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/switchboards/_form_core.html.haml3
-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.erb52
3 files changed, 55 insertions, 0 deletions
diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml
index 61b5934..59a2442 100644
--- a/app/views/switchboards/_form_core.html.haml
+++ b/app/views/switchboards/_form_core.html.haml
@@ -1,2 +1,5 @@
.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')
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..1fd9d9a
--- /dev/null
+++ b/app/views/switchboards/show.html.erb
@@ -0,0 +1,52 @@
+<% 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 %>;
+</script>
+
+<div class='row'>
+ <div class='span12'>
+ <div id='emberjs-container'></div>
+
+ <script type="text/x-handlebars" data-template-name="application">
+ {{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}}
+ <p>
+ <small>
+ {{switchboardEntry.name}}<br>
+
+ {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumbers}}
+ <span class="label">
+ {{phoneNumber.number}}
+ </span>
+ {{/each}}
+ <br>
+ {{show_callstate switchboardEntry.callstate}}
+ </small>
+ </p>
+ </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>