mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Refactored log controller, added log editing
Refactored log controller, added log editing
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
= form_for @log, :html => { :class => 'form-horizontal' }, :url => @loggable_path do |f|
|
||||
= form_for @log, :html => { :class => 'form-horizontal' }, :url => @log.loggable_path do |f|
|
||||
- if @log.loggable_type or @log.loggable_id
|
||||
= f.hidden_field :loggable_id, :class => 'number_field'
|
||||
= f.hidden_field :loggable_type, :class => 'text_field'
|
||||
@@ -44,4 +44,4 @@
|
||||
= f.number_field :action_id, :class => 'number_field'
|
||||
.form-actions
|
||||
= f.submit nil, :class => 'btn btn-primary'
|
||||
= link_to t('.cancel', :default => t("helpers.links.cancel")), @loggable_path, :class => 'btn'
|
||||
= link_to t('.cancel', :default => t("helpers.links.cancel")), @log.loggable_path, :class => 'btn'
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
- model_class = @log.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"
|
||||
Reference in New Issue
Block a user