From c7b119d19bb866630ce9b152b28308ae3487a77f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 16:38:56 +0100 Subject: Added the trash icon. --- app/views/call_histories/_index_core.html.haml | 9 +++------ app/views/call_histories/destroy.js.erb | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 27c6d36..550f055 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -14,7 +14,7 @@ - for call_history in call_histories - if !call_history.display_number.blank? - phone_book_entry = call_history.phone_book_entry_by_number(call_history.display_number) - %tr{:id => "call_history_id_#{call_history.id}"} + %tr{:id => "call_history_id_#{call_history.id}_tr"} %td - if call_history.voicemail_message? .voicemail-message @@ -67,8 +67,5 @@ = link_to t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put %td - if can? :destroy, call_history - = link_to "remove", [@sip_account, call_history], :method => :delete, :remote => true - / %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow", remote: true} - / %i.icon-trash.icon-white - / =t('call_histories.index.actions.destroy') - + = link_to raw(" ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' + \ No newline at end of file diff --git a/app/views/call_histories/destroy.js.erb b/app/views/call_histories/destroy.js.erb index 2d14ddb..d952c58 100644 --- a/app/views/call_histories/destroy.js.erb +++ b/app/views/call_histories/destroy.js.erb @@ -1 +1 @@ -$('#call_history_id_<%= @call_history.id %>').remove(); \ No newline at end of file +$('#call_history_id_<%= @call_history.id %>_tr').remove(); \ No newline at end of file -- cgit v1.2.3