-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pr-party' into develop
- Loading branch information
Showing
38 changed files
with
237 additions
and
157 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
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 |
---|---|---|
|
@@ -109,7 +109,7 @@ def project | |
end | ||
|
||
def remove_thumbnail | ||
self.thumbnail_list = [] | ||
self.thumbnails = [] | ||
self.save! | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class CommunitiesInstitution < ActiveRecord::Base | ||
belongs_to :community | ||
belongs_to :institution | ||
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
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 |
---|---|---|
|
@@ -24,10 +24,10 @@ | |
%dd | ||
= link_to(int.name, institution_path(int)) | ||
%br | ||
- if @collection.thumbnail_list.blank? | ||
- if @collection.thumbnails.blank? | ||
=image_tag "tapaslogo-opaque.png" | ||
-else | ||
%img{src:@collection.thumbnail_list.first} | ||
%img{src:@collection.thumbnails.first} | ||
- if [email protected]? | ||
%dt= "Description" | ||
%dd= @collection.description | ||
|
@@ -53,7 +53,7 @@ | |
%a{href:edit_core_file_path(record), class: ['btn','btn-xs','btn-default','pull-right']} | ||
%i.fa.fa-pencil | ||
= "Edit" | ||
- if record.thumbnail_list.blank? | ||
- if record.thumbnails.blank? | ||
=image_tag "tapaslogo-opaque.png" | ||
-else | ||
%img{src:record.thumbnail.download_path('thumbnail_1')} | ||
|
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 |
---|---|---|
|
@@ -5,17 +5,17 @@ | |
.form-group | ||
= f.label :title, "Title", class: "control-label col-md-2" | ||
.col-md-6 | ||
= f.text_field :title, required: true, pattern: ".*\\S.*", name: 'community[title][]', class: "form-control", placeholder: "University Libraries" | ||
= f.text_field :title, required: true, pattern: ".*\\S.*", name: 'community[title]', class: "form-control", placeholder: "University Libraries" | ||
.form-group | ||
= f.label :description, "Description", class: "control-label col-md-2" | ||
.col-md-6 | ||
= f.text_area :description, required: true, pattern: ".*\\S.*", name: 'community[description][]', class: "form-control", placeholder: "Brief description of the community" | ||
= f.text_area :description, required: true, pattern: ".*\\S.*", name: 'community[description]', class: "form-control", placeholder: "Brief description of the community" | ||
%p.small.help-block="This field accepts plain text" | ||
.form-group | ||
= f.label :is_public, "Visibility", class: "control-label col-md-2" | ||
= f.label :is_public, "Public?", class: "control-label col-md-2" | ||
= f.check_box :is_public, { checked: true } | ||
.form-group | ||
= f.label :thumbnail, "Thumbnail", class: "control-label col-md-2" | ||
= f.label :thumbnail, "Thumbnail", name: 'thumbnail', class: "control-label col-md-2" | ||
.col-md-6 | ||
- if [email protected]? | ||
=image_tag @community.download_path('thumbnail_1') | ||
|
@@ -32,13 +32,8 @@ | |
%span.institution | ||
= f.select :institutions, options_for_select(@institutions), {}, {name: "community[institutions][]", class: "form-control"} | ||
- else | ||
- @community.institutions.each_with_index do |id, i| | ||
%span.institution{:class=> i != 0 ? "to-remove" : ""} | ||
= f.select :institutions, options_for_select(@institutions, id), {}, {name: "community[institutions][]", class: "form-control"} | ||
-if i != 0 | ||
%button.btn.btn-small.btn-danger{"data-delete" => "", "data-target" => ".to-remove", title: "Remove institution", type: "button"} | ||
%i.fa.fa-remove | ||
%br | ||
%span.institution | ||
= f.select :institutions, options_for_select(@institutions), {}, {name: "community[institutions][]", class: "form-control"} | ||
%button#add_another_institution.btn.btn-success{:type => "button"} | ||
%i.fa-plus-sign.fa | ||
Add Institution | ||
|
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
Oops, something went wrong.