summaryrefslogtreecommitdiff
path: root/app/views/switchboards/show.html.erb
blob: 87bb551de663ac0997951e9ac380e9c5b59474fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<% 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">
                <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>
</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>