Skip to content

Commit

Permalink
Add admin guidance for notes
Browse files Browse the repository at this point in the history
* Be explicit that notes are ordered by style
* Warn about deprecated "Original" style
  • Loading branch information
garethrees committed May 1, 2024
1 parent 5b063d7 commit 0377921
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/admin/notes/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

<div class="control-group">
<%= f.label :style, class: 'control-label' %>

<div class="controls">
<%= f.select :style, Note.style_labels %>
<span class="help-block">Notes are sorted by the order defined here.</span>
</div>
</div>

Expand Down
12 changes: 12 additions & 0 deletions app/views/admin/notes/_warnings.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="row">
<div class="span12">
<div class="alert alert-warning">
<h3>Warnings</h3>

<p>
The "Original" style is now deprecated and will be removed in future.
Please transition notes to the new rich text style options.
</p>
</div>
</div>
</div>
6 changes: 6 additions & 0 deletions app/views/admin/notes/edit.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@
data: { confirm: 'Are you sure? This is irreversible.' } %>
(this is permanent!)
<% end %>

<div class="row">
<div class="span12">
<%= render partial: 'warnings' %>
</div>
</div>
6 changes: 6 additions & 0 deletions app/views/admin/notes/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@
<%= submit_tag 'Create', class: 'btn btn-success' %>
</div>
<% end %>

<div class="row">
<div class="span12">
<%= render partial: 'warnings' %>
</div>
</div>

0 comments on commit 0377921

Please sign in to comment.