-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'general-fix' of https://github.com/AyuntamientoMadrid/a…
…gendas into general-fix
- Loading branch information
Showing
13 changed files
with
206 additions
and
25 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,16 @@ | ||
<div class="nested-fields small-12 columns"> | ||
<div class="row"> | ||
<div class="small-2columns left"> | ||
<%= f.hidden_field :_destroy %> | ||
<% if f.object.file.present? && f.object.errors.empty? %> | ||
<%= link_to t('backend.open_file'), f.object.file.url %> | ||
<% else %> | ||
<%= f.file_field :file, class: "attachment" %> | ||
<% end %> | ||
</div> | ||
<div class="small-3 columns left"> | ||
<%= link_to_remove_association t('backend.organization.remove_attachment'), f, | ||
class: "button tiny radius alert right" %> | ||
</div> | ||
</div> | ||
</div> |
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,21 @@ | ||
<fieldset> | ||
<legend><%= t('backend.attachments') %></legend> | ||
<div class="row"> | ||
<div id="nested-attachments"> | ||
<%= f.fields_for :attachments do |attachments_builder| %> | ||
<%= render 'attachment_fields', f: attachments_builder %> | ||
<% end %> | ||
</div> | ||
<div class="small-12 columns"> | ||
<%= link_to_add_association t('backend.organization.add_attachment'), f, | ||
:attachments, | ||
partial: "attachment_fields", | ||
id: "attachments_link", | ||
class: "button tiny radius info", | ||
data: { | ||
association_insertion_node: "#nested-attachments", | ||
association_insertion_method: "append" | ||
} %> | ||
</div> | ||
</div> | ||
</fieldset> |
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
5 changes: 5 additions & 0 deletions
5
db/migrate/20171226135403_add_organization_id_to_attachments.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 AddOrganizationIdToAttachments < ActiveRecord::Migration | ||
def change | ||
add_reference :attachments, :organization, index: true, foreign_key: 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