app/views/expense_gun/expenses/show.html.slim in expense_gun-1.0.0 vs app/views/expense_gun/expenses/show.html.slim in expense_gun-1.0.1
- old
+ new
@@ -1,84 +1,89 @@
.expenses
.actions-block.hidden-print
- if can? :edit, @expense
- = link_to "New expense line", expense_gun.new_expense_expense_line_path(@expense), class: "btn btn-success"
- = link_to "Edit expense", expense_gun.edit_expense_path(@expense), class: "btn btn-default"
- = link_to "Expenses list", expense_gun.expenses_path, class: "btn btn-default"
- a.btn.btn-default href="#" onclick="print(); return false;" = "Print"
+ = link_to t("expense_gun.expense_line.new"), expense_gun.new_expense_expense_line_path(@expense), class: "btn btn-success"
+ = link_to t("expense_gun.expense.edit"), expense_gun.edit_expense_path(@expense), class: "btn btn-default"
+
+ = link_to t("expense_gun.expense.list"), expense_gun.expenses_path, class: "btn btn-default"
+
+ a.btn.btn-default href="#" onclick="print(); return false;" = t("expense_gun.expense.print")
- h1 = "Expense : #{@expense.name}"
+ h1
+ = t("expense_gun.expense.label")
+ = " : "
+ = @expense.name
p
span.date
- strong = "Date : "
+ strong = t("labels.date") + " : "
= @expense.date
br
span.user
- strong = "Employee : "
+ strong = t("labels.employee") + " : "
= @expense.user.full_name if @expense.respond_to?(:user)
br
- span.state
- strong = "State : "
- = @expense.state.capitalize
+ span.state class="#{@expense.state}"
+ strong = t("labels.state") + " : "
+ = t "labels.states." + @expense.state
hr
- for expense_line in @expense.expense_lines
.panel.panel-default
.panel-body
.row
.col-md-6
p
- strong = "Name :"
+ strong = t("labels.name") + " : "
= expense_line.name
p
- strong = "Date :"
+ strong = t("labels.date") + " : "
= expense_line.date
p
- strong = "Category :"
+ strong = t("labels.category") + " : "
= expense_line.category.name
- if expense_line.category.code.present?
= " (#{expense_line.category.code})"
.col-md-6
p
- strong = "Total all taxes :"
+ strong = t("labels.total_all_taxes") + " : "
= "#{expense_line.total_all_taxes} €"
p
- strong = "Tax :"
+ strong = t("labels.vat") + " : "
= "#{expense_line.vat} €"
p
- strong = "Company part :"
+ strong = t("labels.company_part") + " : "
= "#{expense_line.company_part} %"
.panel-footer
.row
.col-md-6.hidden-print
- if can? :edit, @expense
- = link_to "Edit", expense_gun.edit_expense_expense_line_path(expense_line.expense, expense_line), class: "btn btn-default"
- = link_to "Destroy", expense_gun.expense_expense_line_path(expense_line.expense, expense_line), class: "btn btn-danger", "data-method" => "delete", "data-confirm" => "Confirm ?"
+ = link_to t("expense_gun.expense_line.edit"), expense_gun.edit_expense_expense_line_path(expense_line.expense, expense_line), class: "btn btn-default"
+ = link_to t("expense_gun.expense_line.destroy"), expense_gun.expense_expense_line_path(expense_line.expense, expense_line), class: "btn btn-danger", "data-method" => "delete", "data-confirm" => "Confirm ?"
.col-md-6
p
- strong = "Employee payback :"
+ strong = t("labels.employee_payback") + " : "
= "#{expense_line.employee_payback} €"
p
- strong = "Deductible VAT :"
+ strong = t("labels.deductible_vat") + " : "
= "#{expense_line.total_vat_deductible} €"
hr
.panel.panel-default
.panel-body
.row
.col-md-6
- strong = "Total :"
+ strong = t("labels.total") + " : "
.col-md-6
p
- strong = "Total all taxes :"
+ strong = t("labels.total_all_taxes") + " : "
= "#{@expense.total_all_taxes} €"
p
- strong = "Employee payback :"
+ strong = t("labels.employee_payback") + " : "
= "#{@expense.total_employee_payback} €"
p
- strong = "Deductible VAT :"
+ strong = t("labels.deductible_vat") + " : "
= "#{@expense.total_vat_deductible} €"