-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add edit/update actions for project dataset
Allow adding description and making the dataset public.
- Loading branch information
Showing
6 changed files
with
135 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<% content_for :javascript_head do %> | ||
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/trix.umd.min.js"></script> | ||
<% end %> | ||
|
||
<div id="project-form" class="inner-canvas"> | ||
<div class="inner-canvas-header"> | ||
<div class="row"> | ||
<% @title = _("Edit your dataset") %> | ||
<h1><%= @title %></h1> | ||
</div> | ||
</div> | ||
|
||
<div class="inner-canvas-body"> | ||
<div class="row"> | ||
<%= foi_error_messages_for :project, full_message: true %> | ||
</div> | ||
|
||
<div class="row"> | ||
<%= form_for @project, url: project_dataset_path(@project) do |f| %> | ||
<div class="form_input"> | ||
<%= f.label :dataset_description, _('Description'), class: 'form_label' %> | ||
<%= f.rich_text_area :dataset_description %> | ||
</div> | ||
|
||
<div class="form_input"> | ||
<%= f.label :dataset_public, _('Visibility'), class: 'form_label' %> | ||
|
||
<div class="radio_buttons"> | ||
<%= f.radio_button :dataset_public, true, disabled: @project.dataset_public? %> | ||
<%= f.label :dataset_public, _('Public'), value: true %> | ||
<%= f.radio_button :dataset_public, false, disabled: @project.dataset_public? %> | ||
<%= f.label :dataset_public, _('Private'), value: false %> | ||
</div> | ||
|
||
<div class="form_note"> | ||
<%= _('When a dataset is made public, this action cannot be reverted to private.') %> | ||
</div> | ||
</div> | ||
|
||
<div class="form_button"> | ||
<%= f.submit _('Update dataset') %> | ||
</div> | ||
<% end %> | ||
</div> <!-- .row --> | ||
</div> <!-- .inner-canvas-body --> | ||
</div> <!-- #project-form.inner-canvas --> |
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