otwarchive-symphonyarchive/app/views/works/_notes_form.html.erb
2026-03-11 22:22:11 +00:00

40 lines
2 KiB
Text

<dt class="notes"><%= type == "chapter" ? ts("Chapter Notes") : ts("Notes") %></dt>
<dd class="notes">
<ul>
<li class="start">
<% if !params[:claim_id].blank? %>
<%= check_box_tag "front-notes-options-show", "1", true, :class => "toggle_formfield" %>
<%= label_tag 'front-notes-options-show', ts("at the beginning") %>
<% else %>
<%= check_box_tag "front-notes-options-show", "1", !f.object.notes.blank?, :class => "toggle_formfield" %>
<%= label_tag 'front-notes-options-show', ts("at the beginning") %>
<% end %>
<span class="warning<%= f.object.notes.blank? ? ' hidden' : '' %>">
<%= ts("Warning: Unchecking this box will delete the existing beginning note.") %>
</span>
<fieldset id="front-notes-options" class="start">
<legend><%= f.label :notes, ts("Notes") %></legend>
<% if @posting_claim && @posting_claim.prompt_description.present? %>
<%= f.text_area :notes, :class => "observe_textlength", :value => "<strong>Prompt:</strong> #{@posting_claim.prompt_description}" %>
<%= generate_countdown_html("#{type}_notes", ArchiveConfig.NOTES_MAX) %>
<% else %>
<%= f.text_area :notes, :class => "observe_textlength" %>
<%= generate_countdown_html("#{type}_notes", ArchiveConfig.NOTES_MAX) %>
<% end %>
</fieldset>
</li>
<li class="end">
<%= check_box_tag "end-notes-options-show", "1", !f.object.endnotes.blank?, :class => "toggle_formfield" %>
<%= label_tag 'end-notes-options-show', ts("at the end") %>
<span class="warning<%= f.object.endnotes.blank? ? ' hidden' : '' %>">
<%= ts("Warning: Unchecking this box will delete the existing end note.") %>
</span>
<fieldset id="end-notes-options" class="end">
<legend><%= f.label :endnotes, ts("End Notes") %></legend>
<%= f.text_area :endnotes, :class => "observe_textlength" %>
<%= generate_countdown_html("#{type}_endnotes", ArchiveConfig.NOTES_MAX) %>
</fieldset>
</li>
</ul>
</dd>