1
0

Unified hash options style

This commit is contained in:
cryptogopher
2019-11-27 21:24:49 +01:00
parent 1982f3b526
commit 158685459d
21 changed files with 99 additions and 96 deletions

View File

@@ -1,5 +1,5 @@
<%= render :partial => 'quantities/filters',
:locals => {:url => filter_project_quantities_path(@project)} %>
<%= render partial: 'quantities/filters',
locals: {url: filter_project_quantities_path(@project)} %>
<% if @quantities.any? { |q| q.persisted? } %>
<table class="list">
@@ -68,7 +68,7 @@
<%= labelled_form_for @quantity, url: quantity_path(@quantity), method: :patch,
remote: true, html: {id: 'quantity-edit-form'} do |f| %>
<%= render :partial => 'quantities/form', :locals => { :f => f } %>
<%= render partial: 'quantities/form', locals: {f: f} %>
<%= submit_tag l(:button_save) %>
<%=
link_to l(:button_cancel), "#",

View File

@@ -1,11 +1,11 @@
<% content_for :sidebar do %>
<%= render :partial => 'body_trackers/sidebar' %>
<%= render partial: 'body_trackers/sidebar' %>
<% end %>
<div class="contextual">
<% if User.current.allowed_to?(:manage_common, @project) %>
<%= link_to t(".link_new_quantity"), '#', :class => 'icon icon-add',
:onclick => '$("#add-quantity").toggle(); $("#quantity_name").focus(); return false;' %>
<%= link_to t(".link_new_quantity"), '#', class: 'icon icon-add',
onclick: '$("#add-quantity").toggle(); $("#quantity_name").focus(); return false;' %>
<% end %>
</div>
@@ -13,9 +13,9 @@
<h2><%= t ".heading_new_quantity" %></h2>
<%= labelled_form_for @quantity,
:url => project_quantities_path(@project),
:html => {:id => 'quantity-add-form'} do |f| %>
<%= render :partial => 'quantities/form', :locals => { :f => f } %>
url: project_quantities_path(@project),
html: {id: 'quantity-add-form'} do |f| %>
<%= render partial: 'quantities/form', locals: {f: f} %>
<%= submit_tag l(:button_create) %>
<%= link_to l(:button_cancel), "#", onclick: '$("#add-quantity").hide(); return false;' %>
<% end %>
@@ -24,5 +24,5 @@
<h2><%= t ".heading" %></h2>
<div id='quantities'>
<%= render :partial => 'quantities/index' %>
<%= render partial: 'quantities/index' %>
</div>

View File

@@ -1,4 +1,4 @@
$('div[id^=flash_]').remove();
$('#content').prepend('<%= escape_javascript(render_flash_messages) %>');
$('#quantities').html('<%= escape_javascript(render :partial => 'quantities/index') %>');
$('#quantities').html('<%= escape_javascript(render partial: 'quantities/index') %>');
$('#quantity_domain').trigger('change');