From 595e5f9d32c9dda8f7b6c0dd5e7e4fba4693eca4 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 20 Mar 2013 17:08:14 +0100 Subject: basic Ember.js setup --- app/views/switchboards/app.js | 8 ++++++++ app/views/switchboards/show-old.html.haml | 21 +++++++++++++++++++++ app/views/switchboards/show.html.erb | 23 +++++++++++++++++++++++ app/views/switchboards/show.html.haml | 21 --------------------- 4 files changed, 52 insertions(+), 21 deletions(-) create mode 100644 app/views/switchboards/app.js create mode 100644 app/views/switchboards/show-old.html.haml create mode 100644 app/views/switchboards/show.html.erb delete mode 100644 app/views/switchboards/show.html.haml (limited to 'app/views') diff --git a/app/views/switchboards/app.js b/app/views/switchboards/app.js new file mode 100644 index 0000000..a4aa100 --- /dev/null +++ b/app/views/switchboards/app.js @@ -0,0 +1,8 @@ +window.App = Ember.Application.create({ + rootElement: '#xxxyyy', + + ready: function() { + App.view.appendTo('#xxxyyy'); + } +}); + diff --git a/app/views/switchboards/show-old.html.haml b/app/views/switchboards/show-old.html.haml new file mode 100644 index 0000000..a825806 --- /dev/null +++ b/app/views/switchboards/show-old.html.haml @@ -0,0 +1,21 @@ +- content_for :title, "Switchboard #{@switchboard.name}" + +.row + .span12 + = render :partial => "current_user_dashboard", :current_user => current_user + + %ul.thumbnails + = render :partial => "switchboard_entries/switchboard_entry", :collection => @switchboard_entries + + - if can? :edit, @switchboard + .row + .span12 + %a.btn.btn-small.btn-warning{:href => switchboard_switchboard_entries_path(@switchboard) } + %i.icon-edit.icon-white + %span.hidden-phone + =t("switchboard_entries.index.page_title") + + .span6 + + += subscribe_to "/switchboards/#{@switchboard.id}" \ No newline at end of file diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb new file mode 100644 index 0000000..337d00c --- /dev/null +++ b/app/views/switchboards/show.html.erb @@ -0,0 +1,23 @@ +<% content_for :title, "Switchboard #{@switchboard.name}" %> + +
+
+
+ +
+ + + + + +
+
+ + + + + diff --git a/app/views/switchboards/show.html.haml b/app/views/switchboards/show.html.haml deleted file mode 100644 index a825806..0000000 --- a/app/views/switchboards/show.html.haml +++ /dev/null @@ -1,21 +0,0 @@ -- content_for :title, "Switchboard #{@switchboard.name}" - -.row - .span12 - = render :partial => "current_user_dashboard", :current_user => current_user - - %ul.thumbnails - = render :partial => "switchboard_entries/switchboard_entry", :collection => @switchboard_entries - - - if can? :edit, @switchboard - .row - .span12 - %a.btn.btn-small.btn-warning{:href => switchboard_switchboard_entries_path(@switchboard) } - %i.icon-edit.icon-white - %span.hidden-phone - =t("switchboard_entries.index.page_title") - - .span6 - - -= subscribe_to "/switchboards/#{@switchboard.id}" \ No newline at end of file -- cgit v1.2.3 From 877364c24ef9c7954f0e193456bb3f2d39169977 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 25 Mar 2013 10:26:49 +0100 Subject: First try --- app/views/switchboards/show.html.erb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index 337d00c..a4bdae0 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -1,19 +1,26 @@ <% content_for :title, "Switchboard #{@switchboard.name}" %> + +
-
- -
+
+ -
-- cgit v1.2.3 From 64653a9149eca977c16233abb0a472730b94a464 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Mar 2013 16:55:08 +0100 Subject: Store reload interval in the Switchboard table. --- app/views/switchboards/_form_core.html.haml | 3 +++ app/views/switchboards/app.js | 8 ------ app/views/switchboards/show.html.erb | 40 +++++++++++++++++++++++------ 3 files changed, 35 insertions(+), 16 deletions(-) delete mode 100644 app/views/switchboards/app.js (limited to 'app/views') 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 @@
-
- -
-- cgit v1.2.3 From cea2cc3c1cc1e48fc4600c698d52dfda2bde4505 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 3 Apr 2013 22:08:19 +0200 Subject: Massive changes to the switchboard. --- app/views/switchboards/show.html.erb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'app/views') diff --git a/app/views/switchboards/show.html.erb b/app/views/switchboards/show.html.erb index 87bb551..1fd9d9a 100644 --- a/app/views/switchboards/show.html.erb +++ b/app/views/switchboards/show.html.erb @@ -22,20 +22,18 @@ {{#each switchboardEntry in switchboardEntrys}}
  • - - User-male-16x - + {{avatar_img switchboardEntry.avatar_src}}

    - {{switchboardEntry.name}} -
    - - 33 - + {{switchboardEntry.name}}
    + + {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumbers}} + + {{phoneNumber.number}} + + {{/each}}
    - - - + {{show_callstate switchboardEntry.callstate}}

    -- cgit v1.2.3