summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-04 12:04:34 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-04 12:04:34 +0200
commitd6a733440eee34dab3daf25089d40aed91018a49 (patch)
tree632e46e34a4338a6e3b4f7cb2c29c123f50a4ea9 /app/views
parentcea2cc3c1cc1e48fc4600c698d52dfda2bde4505 (diff)
Limit the amount of displayed phone_numbers in a switchboard_entry
Diffstat (limited to 'app/views')
-rw-r--r--app/views/switchboards/_form_core.html.haml1
-rw-r--r--app/views/switchboards/show.html.erb3
2 files changed, 3 insertions, 1 deletions
diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml
index 59a2442..2258640 100644
--- a/app/views/switchboards/_form_core.html.haml
+++ b/app/views/switchboards/_form_core.html.haml
@@ -3,3 +3,4 @@
= 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.erb b/app/views/switchboards/show.html.erb
index 1fd9d9a..a240b55 100644
--- a/app/views/switchboards/show.html.erb
+++ b/app/views/switchboards/show.html.erb
@@ -4,6 +4,7 @@
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'>
@@ -27,7 +28,7 @@
<small>
{{switchboardEntry.name}}<br>
- {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumbers}}
+ {{#each phoneNumber in switchboardEntry.sipAccount.phoneNumberShortList}}
<span class="label">
{{phoneNumber.number}}
</span>