Sha256: 0b1975892334cfd04debd6139bbc47c7e56f4c9e9274e9f8b325d941dae35086
Contents?: true
Size: 1.63 KB
Versions: 1
Compression:
Stored size: 1.63 KB
Contents
- default_page_title ||= nil; on_site_link ||= nil - current_title = default_page_title || model_class.model_name.human.pluralize(:ru) - title current_title - object_type = ::Tramway::Admin.available_models_for(@application_engine).include?(object.class) ? :record : :singleton = content_for :sidebar do - buttons = ::Tramway::Admin.additional_buttons(record: object.model.class.to_s, view: :show) - if buttons .btn-group-vertical = build_buttons buttons .page-header .row .col-md-6 %h2 = current_title - edit_path = object_type == :singleton ? edit_current_model_singleton_path : edit_current_model_record_path(object.id) = link_to fa_icon(:pencil), edit_path, class: 'btn btn-warning btn-xs' %hr .row %table.table.table-striped.table-bordered - object.attributes.each do |attribute_name, value| %tr %td = model_class.human_attribute_name attribute_name %td = value %td - if attribute_name != 'state' && object.model.class.state_machines.keys.include?(attribute_name.to_sym) = state_events_buttons object, state_method: attribute_name, model_param_name: :record, route_method: :current_model_record_path - object.associations(:has_many).each do |association| %tr %td = model_class.human_attribute_name association.name %td{ colspan: 2 } %table.table.table-striped.table-bordered - object.send(association.name).each do |association_object| %tr %td = association_object.id %td = association_object.name
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tramway-admin-1.6.1 | app/views/tramway/admin/shared/_show.html.haml |