-
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.
- Loading branch information
Martin Simpson
committed
Feb 26, 2024
1 parent
6212ef5
commit f11327d
Showing
10 changed files
with
57 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="form-group <%= "#{template}_date_#{date_type}" %>"> | ||
<label class="control-label" for="<%= "#{template}_date_#{date_type}" %>"><%= t("simple_form.labels.defaults.date_#{date_type}") %></label> | ||
<span class="label label-info required-tag">required</span> | ||
<p class="help-block"><%= t("simple_form.hints.defaults.date_#{date_type}") %></p> | ||
|
||
<div class="form-inline <%= "date_#{date_type}" %>"> | ||
|
||
<% # The form-group class "#{template}_date_#{date_type}_..." is used for DOI auto population %> | ||
<div class="form-group <%= "#{template}_date_#{date_type}_year" %>"> | ||
<%= select_year(f.object.model.send("date_#{date_type}").to_s.split('-')[0].to_i, {start_year: (Date.today.year + 6), end_year: 1750, prompt: "Select year"}, {id: "#{template}_date_#{date_type}__date_#{date_type}_year", name: "#{template}[date_#{date_type}][][date_#{date_type}_year]", class: "form-control ubiquity-date-#{date_type}-year ubiquity-date-input #{template}_date_#{date_type}_year", required: true}) %> | ||
</div> | ||
<div class="form-group <%= "#{template}_date_#{date_type}_month" %>"> | ||
<%= select_month(f.object.model.send("date_#{date_type}").to_s.split('-')[1].to_i, { use_two_digit_numbers: true, prompt: 'select month if available'}, {id: "#{template}_date_#{date_type}__date_#{date_type}_month", name: "#{template}[date_#{date_type}][][date_#{date_type}_month]", class: "form-control ubiquity-date-#{date_type}-month ubiquity-date-input #{template}_date_#{date_type}_month" }) %> | ||
</div> | ||
<div class="form-group <%= "#{template}_date_#{date_type}_day" %>"> | ||
<%= select_day(f.object.model.send("date_#{date_type}").to_s.split('-')[2].to_i, { use_two_digit_numbers: true, prompt: 'select day if available'}, {id: "#{template}_date_#{date_type}__date_#{date_type}_day", name: "#{template}[date_#{date_type}][][date_#{date_type}_day]", class: "form-control ubiquity-date-#{date_type}-day ubiquity-date-input #{template}_date_#{date_type}_day" }) %> | ||
</div> | ||
</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
app/views/una_archival_items/edit_fields/_date_published.html.erb
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
4 changes: 4 additions & 0 deletions
4
app/views/una_chapters_and_book_sections/edit_fields/_date_published.html.erb
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
4 changes: 4 additions & 0 deletions
4
app/views/una_presentations/edit_fields/_date_published.html.erb
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
4 changes: 4 additions & 0 deletions
4
app/views/una_thesis_or_dissertations/edit_fields/_date_published.html.erb
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
4 changes: 4 additions & 0 deletions
4
app/views/una_time_based_medias/edit_fields/_date_published.html.erb
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 @@ | ||
<%# see app/views/records/edit_fields/_date_published.html.erb %> | ||
<% template = f.object.model.class.to_s.underscore %> | ||
|
||
<%= render "una/date_fields", date_type: "published", template: template, f: f %> |
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