Some UX improvements
This commit is contained in:
parent
48c0067076
commit
8c81237501
81 changed files with 791 additions and 151 deletions
|
|
@ -10,8 +10,8 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<strong><%= Check.human_attribute_name(:success_criterion) %>:</strong>
|
||||
<%= check.success_criterion %>
|
||||
<strong><%= Check.human_attribute_name(:success_criterion_html) %>:</strong>
|
||||
<%= check.success_criterion_html %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
json.extract! check, :id, :position, :name, :success_criterion, :level, :created_at, :updated_at
|
||||
json.extract! check, :id, :position, :name, :success_criterion_html, :level, :created_at, :updated_at
|
||||
json.url check_url(check, format: :json)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<%= bootstrap_form_with(model: check, remote: true) do |form| %>
|
||||
<%= form.text_field :position %>
|
||||
<%= form.text_field :name %>
|
||||
<%= form.text_area :success_criterion %>
|
||||
<%= form.rich_text_area :success_criterion_html %>
|
||||
<%= form.select :level, Check.levels.keys, add_blank: !form.object.level.present? %>
|
||||
<%= form.submit %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<th><%= Check.human_attribute_name(:id) %></th>
|
||||
<th><%= Check.human_attribute_name(:level) %></th>
|
||||
<th><%= Check.human_attribute_name(:name) %></th>
|
||||
<th><%= Check.human_attribute_name(:success_criterion) %></th>
|
||||
<th><%= Check.human_attribute_name(:success_criterion_html) %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @checks.each do |check| %>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<td><%= check.id %></td>
|
||||
<td><%= check.level %></td>
|
||||
<td><%= link_to(check.name, url_for(check)) %></td>
|
||||
<td><%= link_to(truncate(check.success_criterion), url_for(check)) %></td>
|
||||
<td><%= link_to(truncate(strip_tags(check.success_criterion_html.to_s)), url_for(check)) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@
|
|||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_edit", model: @check.model_name.human), edit_check_path(@check) %>
|
||||
<%= link_to t("scaffold.link_index", model: @check.model_name.human(count: 2)), checks_path %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @check.model_name.human), @check, method: :delete, class: "btn btn-warning" %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @check.model_name.human), @check, method: :delete, class: "btn btn-outline-danger" %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue