Commit fa8d45fc1ec3b635c8d14465b8ef036274667598
1 parent
7621915d
Exists in
master
and in
29 other branches
Include javascript from theme in NG layout
(ActionItem1500)
Showing
2 changed files
with
10 additions
and
0 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -643,6 +643,15 @@ module ApplicationHelper |
643 | 643 | html.join "\n" |
644 | 644 | end |
645 | 645 | |
646 | + def theme_javascript_ng | |
647 | + script = File.join(theme_path, 'theme.js') | |
648 | + if File.exists?(File.join(Rails.root, 'public', script)) | |
649 | + javascript_include_tag script | |
650 | + else | |
651 | + nil | |
652 | + end | |
653 | + end | |
654 | + | |
646 | 655 | def file_field_or_thumbnail(label, image, i) |
647 | 656 | display_form_field label, ( |
648 | 657 | render :partial => (image && image.valid? ? 'shared/show_thumbnail' : 'shared/change_image'), | ... | ... |