-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extending the Spotlight::Exhibit Model for permitting the suppressing…
… of thumbnails (from within the "General" configuration interface); Providing a thumbnail retrieval method within the CatalogController (this was necessary in order to determine whether or not the Exhibit suppresses thumbnail displays); Fixing the sneakers command in the README (PlumEventHandler no has been renamed FiggyEventHandler)
- Loading branch information
1 parent
a97f372
commit 858b46d
Showing
10 changed files
with
123 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<%= bootstrap_form_for @exhibit, url: ((spotlight.exhibit_path(@exhibit) if @exhibit.persisted?) || spotlight.exhibits_path), layout: :horizontal, label_col: 'col-md-2', control_col: 'col-md-10', html: {class: "row"} do |f| %> | ||
<div class="row col-md-12"> | ||
<%= f.text_field :title %> | ||
<%= f.text_field :subtitle %> | ||
<%= f.text_area :description %> | ||
<%= f.text_field :tag_list, value: f.object.tag_list.to_s %> | ||
<%= f.form_group(:contact_emails, label: { text: nil, class: nil }, help: nil) do %> | ||
<%= f.fields_for :contact_emails do |contact| %> | ||
<%= render partial: 'contact', locals: {exhibit: @exhibit, contact: contact} %> | ||
<% end %> | ||
<span id='another-email' class="btn btn-sm btn-info"><%= t('.add_contact_email_button') %></span> | ||
<p class="help-block"><%= t(:'.fields.contact_emails.help_block') %></p> | ||
<% end %> | ||
<%= f.form_group :thumbnails_enabled, label: { text: 'Display thumbnails?', class: nil }, help: nil do %> | ||
<%= f.check_box :thumbnails_enabled, value: f.object.thumbnails_enabled, label: "" %> | ||
<% end %> | ||
<%= f.form_group :published, label: { text: nil, class: nil }, help: nil do %> | ||
<%= f.check_box :published, label: "" %> | ||
<p class="help-block"><%= t(:'.fields.published.help_block') %></p> | ||
<% end %> | ||
|
||
<div class="form-actions"> | ||
|
||
<div class="primary-actions"> | ||
<%= f.submit nil, class: 'btn btn-primary' %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
db/migrate/20190214151046_add_thumbnails_enabled_to_exhibits.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddThumbnailsEnabledToExhibits < ActiveRecord::Migration[5.0] | ||
def change | ||
add_column :spotlight_exhibits, :thumbnails_enabled, :boolean, default: true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters