mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 16:31:38 -04:00
actsasloggable transaction actions fixtures, resources, controller, and views
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
= form_for transaction_action, :html => { :class => 'form-horizontal' } do |f|
|
||||
.control-group
|
||||
= f.label :action, :class => 'control-label'
|
||||
.controls
|
||||
= f.text_field :action, :class => 'text_field'
|
||||
.form-actions
|
||||
= f.submit nil, :class => 'btn btn-primary'
|
||||
= link_to t('.cancel', :default => t("helpers.links.cancel")), acts_as_loggable_transaction_actions_path, :class => 'btn'
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = transaction_action.class
|
||||
.page-header
|
||||
%h1=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human, :default => "Edit #{model_class.model_name.human}")
|
||||
= render :partial => "form"
|
||||
@@ -0,0 +1,21 @@
|
||||
- model_class = ActsAsLoggable::TransactionAction.new.class
|
||||
.page-header
|
||||
%h1=t '.title', :default => model_class.model_name.human.pluralize
|
||||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= model_class.human_attribute_name(:id)
|
||||
%th= model_class.human_attribute_name(:action)
|
||||
%th= model_class.human_attribute_name(:created_at)
|
||||
%th=t '.actions', :default => t("helpers.actions")
|
||||
%tbody
|
||||
- transaction_actions.each do |transaction_action|
|
||||
%tr
|
||||
%td= link_to transaction_action.id, acts_as_loggable_transaction_action_path(transaction_action)
|
||||
%td= transaction_action.action
|
||||
%td=l transaction_action.created_at
|
||||
%td
|
||||
= link_to t('.edit', :default => t("helpers.links.edit")), edit_acts_as_loggable_transaction_action_path(transaction_action), :class => 'btn btn-mini'
|
||||
= link_to t('.destroy', :default => t("helpers.links.destroy")), acts_as_loggable_transaction_action_path(transaction_action), :method => :delete, :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), :class => 'btn btn-mini btn-danger'
|
||||
|
||||
= link_to t('.new', :default => t("helpers.links.new")), new_acts_as_loggable_transaction_action_path, :class => 'btn btn-primary'
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = transaction_action.class
|
||||
.page-header
|
||||
%h1=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human, :default => "New #{model_class.model_name.human}")
|
||||
= render :partial => "form"
|
||||
@@ -0,0 +1,13 @@
|
||||
- model_class = transaction_action.class
|
||||
.page-header
|
||||
%h1=t '.title', :default => model_class.model_name.human
|
||||
|
||||
%p
|
||||
%strong= model_class.human_attribute_name(:action) + ':'
|
||||
%br
|
||||
= transaction_action.action
|
||||
|
||||
.form-actions
|
||||
= link_to t('.back', :default => t("helpers.links.back")), acts_as_loggable_transaction_actions_path, :class => 'btn'
|
||||
= link_to t('.edit', :default => t("helpers.links.edit")), edit_acts_as_loggable_transaction_action_path(transaction_action), :class => 'btn'
|
||||
= link_to t('.destroy', :default => t("helpers.links.destroy")), acts_as_loggable_transaction_action_path(transaction_action), :method => "delete", :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), :class => 'btn btn-danger'
|
||||
Reference in New Issue
Block a user