% if (params[:controller]=="emo_months") && (params[:action]=="new") %>
<% if params[:emo_month].present? && params[:emo_month][:emo_function_id].is_valid_id? %>
<% current_emo_function_id = params[:emo_month][:emo_function_id] %>
<% elsif @emo_month.emo_function_id.is_valid_id? %>
<% current_emo_function_id = @emo_month.emo_function_id %>
<% else %>
<% current_emo_function_id = nil %>
<% end %>
<% elsif (params[:controller]=="emo_months") && (["edit","show"].include?(params[:action])) %>
<% current_emo_function_id = @emo_month.emo_function_id %>
<% end %>
<% if current_emo_function_id.is_valid_id? %>
<% current_emo_function = EmoFunction.find(current_emo_function_id) %>
Dettaglio funzione: <%= iconbutton_edit edit_emo_function_path(current_emo_function) %>
<%= edit_table_open %>
<%= edit_table_row (EmoFunction.human_attribute_name('descrizione')), (current_emo_function.descrizione) %>
<%= edit_table_row (EmoFunction.human_attribute_name('emo_sector_id')),(current_emo_function.emo_sector_id? ? link_to(current_emo_function.emo_sector.format_for_formselect, emo_sector_path(current_emo_function.emo_sector) ) : nil) %>
<%= edit_table_row (EmoFunction.human_attribute_name('person_id')),(current_emo_function.person_id.present? ? link_to( current_emo_function.person.dh_person_name, person_path(current_emo_function.person) ) : nil) %>
<%= edit_table_row (EmoFunction.human_attribute_name('monthly_hours')), (current_emo_function.monthly_hours) %>
<%= edit_table_row (EmoFunction.human_attribute_name('hourly_payment')), money_format(current_emo_function.hourly_payment) %>
<%= edit_table_row (EmoFunction.human_attribute_name('monthly_salary')), money_format(current_emo_function.monthly_salary) %>
<%= edit_table_row (EmoFunction.human_attribute_name('scalo_fisso')), money_format(current_emo_function.scalo_fisso) %>
<%= edit_table_row (EmoFunction.human_attribute_name('rimborso_per_km')), money_format(current_emo_function.rimborso_per_km) %>
<%= edit_table_row (EmoFunction.human_attribute_name('rimborso_mobile')), money_format(current_emo_function.rimborso_mobile) %>
<%= edit_table_row (EmoFunction.human_attribute_name('emo_fund_id')), ( current_emo_function.emo_fund_id.present? ? link_to( current_emo_function.emo_fund.format_for_formselect, emo_fund_path(current_emo_function.emo_fund) ) : nil) %>
<%= edit_table_row (EmoFunction.human_attribute_name('note')),(text_area_tag :note, current_emo_function.note, rows: 10, disabled: true) %>
<%= edit_table_close %>
Dettaglio settore: <%= iconbutton_edit edit_emo_sector_path(current_emo_function.emo_sector) %>
<%= edit_table_open %>
<%= edit_table_row (EmoFunction.human_attribute_name('descrizione')), (current_emo_function.emo_sector.descrizione) %>
<%= edit_table_row (EmoFunction.human_attribute_name('responsabile_id')),(current_emo_function.emo_sector.responsabile_id.present? ? link_to( current_emo_function.emo_sector.responsabile.dh_person_name, person_path(current_emo_function.emo_sector.responsabile) ) : nil) %>
<%= edit_table_row (EmoFunction.human_attribute_name('note')),(text_area_tag :note, current_emo_function.emo_sector.note, rows: 10, disabled: true) %>
<%= edit_table_close %>
<% else %>
Dettaglio funzione:
Non disponibile.
Dettaglio settore:
Non disponibile.
<% end %>