diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-26 16:55:08 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-03 22:09:33 +0200 |
commit | 64653a9149eca977c16233abb0a472730b94a464 (patch) | |
tree | 7cfd94c7a7cd44374cf88c61f0f7bd926c351615 /app/views/switchboards | |
parent | 877364c24ef9c7954f0e193456bb3f2d39169977 (diff) |
Store reload interval in the Switchboard table.
Diffstat (limited to 'app/views/switchboards')
-rw-r--r-- | app/views/switchboards/_form_core.html.haml | 3 | ||||
-rw-r--r-- | app/views/switchboards/app.js | 8 | ||||
-rw-r--r-- | app/views/switchboards/show.html.erb | 40 |
3 files changed, 35 insertions, 16 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/app.js b/app/views/switchboards/app.js deleted file mode 100644 index a4aa100..0000000 --- a/app/views/switchboards/app.js +++ /dev/null @@ -1,8 +0,0 @@ -window.App = Ember.Application.create({ - rootElement: '#xxxyyy', - - ready: function() { - App.view.appendTo('#xxxyyy'); - } -}); - diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index a4bdae0..87bb551 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -2,23 +2,47 @@ <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='container'></div> - - <script type="text/x-handlebars"> - <p>{{appName}}</p> - <p>{{title}}</p> + <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"> - <h1>{{name}}</h1> - <p>switchboard view marker</p> - <p>Length: {{switchboardEntrys.length}}</p> + <h2>{{name}}</h2> + + {{#if switchboardEntrys.length}} + <ul class="thumbnails"> + {{#each switchboardEntry in switchboardEntrys}} + <li class="span2"> + <div class="thumbnail"> + <a class="thumbnail" href="/tenants/2/users/2"> + <img alt="User-male-16x" class="img-rounded" src="/assets/icons/user-male-16x.png" style="width: 100px;"> + </a> + <p> + <small> + {{switchboardEntry.name}} + <br> + <span class="label"> + 33 + </span> + <br> + <span class="label label-inverse"> + <i class="icon-ban-circle icon-white"></i> + </span> + </small> + </p> + </div> + </li> + {{/each}} + </ul> + {{/if}} </script> </div> |