Skip to content

Commit

Permalink
#5 Add turbolinks track
Browse files Browse the repository at this point in the history
  • Loading branch information
marjinal1st committed Jan 21, 2014
1 parent 973db8f commit d91ed23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
14 changes: 8 additions & 6 deletions app/views/kebapage/media/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
=stylesheet_link_tag 'kebapage/application'
- content_for :head do
= stylesheet_link_tag 'kebapage/application', media: 'all', 'data-turbolinks-track' => true

- content_for :foot do
= javascript_include_tag 'kebapage/application', 'data-turbolinks-track' => true

.form-group
=simple_form_for @medium, multipart: true, html: { class: :dropzone, id: 'media-dropzone' } do |f|
=f.input :attachment, as: :hidden
= simple_form_for @medium, multipart: true, html: { class: :dropzone, id: 'media-dropzone' } do |f|
= f.input :attachment, as: :hidden

.panel.panel-default.grid
.panel-heading
Expand Down Expand Up @@ -32,6 +36,4 @@
= media.attachment_updated_at
%td.action
%a.btn.btn-success{href: media.attachment.url }
%i.icon-zoom-in

=javascript_include_tag 'kebapage/application'
%i.icon-zoom-in
10 changes: 6 additions & 4 deletions app/views/kebapage/static_pages/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
=stylesheet_link_tag 'kebapage/application'
- content_for :head do
= stylesheet_link_tag 'kebapage/application', media: 'all', 'data-turbolinks-track' => true

- content_for :foot do
= javascript_include_tag 'kebapage/application', 'data-turbolinks-track' => true

.panel.panel-default
.panel-heading
Expand All @@ -15,6 +19,4 @@

.form-actions
%button.btn.btn-default{type: 'submit'} #{I18n.t('kebapage.submit')}
%a.btn{href: static_pages_path} #{I18n.t('kebapage.cancel')}

=javascript_include_tag 'kebapage/application'
%a.btn{href: static_pages_path} #{I18n.t('kebapage.cancel')}

0 comments on commit d91ed23

Please sign in to comment.