summaryrefslogtreecommitdiff
path: root/app/views/softkeys/_index_core.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:53:28 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:53:28 +0100
commitc9066760fd1f5f2f892ce2be5cf2a83bb5210246 (patch)
tree82ecdd528e803ccd1b469dc13482e06cf8ea0b8e /app/views/softkeys/_index_core.html.haml
parent0b97717b2171820dea41de8df705f8f0e4b71464 (diff)
parentfb66a5e5a4c5d5f9eac4a5e8de6a286482cb55d5 (diff)
Release a new beta.5.1-beta4
Diffstat (limited to 'app/views/softkeys/_index_core.html.haml')
-rw-r--r--app/views/softkeys/_index_core.html.haml34
1 files changed, 20 insertions, 14 deletions
diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml
index 398ee51..4a06c72 100644
--- a/app/views/softkeys/_index_core.html.haml
+++ b/app/views/softkeys/_index_core.html.haml
@@ -1,15 +1,21 @@
-%table.table.table-striped
- %thead
- %tr
- %th= t('softkeys.index.function')
- %th= t('softkeys.index.number')
- %th= t('softkeys.index.label')
-
- %tbody
- - for softkey in softkeys.order(:position)
+- cache(['softkeys_table', I18n.locale, current_user, softkeys]) do
+ %table.table.table-striped
+ %thead
%tr
- %td
- =softkey.to_s
- %td= softkey.number
- %td= softkey.label
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file
+ %th
+ %th= t('softkeys.index.function')
+ %th= t('softkeys.index.number')
+ %th= t('softkeys.index.label')
+
+ %tbody{ :id => "softkeys", :'data-update-url' => sort_softkeys_url}
+ - for softkey in softkeys
+ - cache(['softkeys_table_tr', I18n.locale, current_user, softkey]) do
+ = content_tag_for :tr, softkey do
+ %td
+ - if softkeys.count > 1
+ %span.handle
+ %i.icon-resize-vertical
+ %td= t("softkeys.functions.#{softkey.softkey_function}")
+ %td= softkey.number
+ %td= softkey.label
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file