diff options
author | Peter Kozak <spag@golwen.net> | 2013-02-26 16:29:16 -0500 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-02-26 16:29:16 -0500 |
commit | 22bd2d6fb05e488527beb9c0e134c1fa47673a35 (patch) | |
tree | a9a2f96cde75a7e57073b090d2d05eaa84f65d16 /app/views/phone_numbers | |
parent | c175bbeec5c1573ba34da80cd1ec024e2be32b40 (diff) |
use partials for buttons
Diffstat (limited to 'app/views/phone_numbers')
-rw-r--r-- | app/views/phone_numbers/show.html.haml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/app/views/phone_numbers/show.html.haml b/app/views/phone_numbers/show.html.haml index de6cb1b..9fe6ea4 100644 --- a/app/views/phone_numbers/show.html.haml +++ b/app/views/phone_numbers/show.html.haml @@ -9,15 +9,16 @@ %strong= t('phone_numbers.show.number') + ":" = @phone_number.to_s += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number.phone_numberable, :child => @phone_number } + - if @ringtoneable_classes.has_key?(@phone_number.phone_numberable.class.to_s) %p - %strong= t('ringtones.name') + ':' - - if @phone_number.ringtones.count > 0 - = link_to @phone_number.ringtones.first, phone_number_ringtone_path(@phone_number, @phone_number.ringtones.first) - - else - = link_to t('ringtones.set_a_ringtone'), new_phone_number_ringtone_path(@phone_number) - -= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number.phone_numberable, :child => @phone_number } + %strong= t('ringtones.name') + ':' + - if @phone_number.ringtones.count > 0 + = @phone_number.ringtones.first + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number, :child => @phone_number.ringtones.first } + - else + = render :partial => 'shared/create_link', :locals => { :parent => @phone_number, :child_class => Ringtone } - if @forwardable_classes.has_key?(@phone_number.phone_numberable.class.to_s) %h3= t("call_forwards.index.page_title") |