Merge branch 'master' into allow-no-nickname

Conflicts:
	app/views/foodcoop/users/_users.html.haml
This commit is contained in:
wvengen 2013-10-29 19:15:52 +01:00
commit c37ed74942
84 changed files with 1712 additions and 2579 deletions

View file

@ -5,8 +5,8 @@
%table.table.table-striped
%thead
%tr
%th= t('simple_form.labels.article_category.name')
%th= t('simple_form.labels.article_category.description')
%th= heading_helper ArticleCategory, :name
%th= heading_helper ArticleCategory, :description
%th
%tbody
- @article_categories.each do |article_category|

View file

@ -6,16 +6,15 @@
%thead
%tr
%th
%th= sort_link_helper t('simple_form.labels.article.name'), "name"
%th= sort_link_helper heading_helper(Article, :name), "name"
%th
%th= sort_link_helper t('simple_form.labels.article.article_category'), "category"
%th= sort_link_helper t('simple_form.labels.article.unit'), "unit"
%th= sort_link_helper t('simple_form.labels.article.note'), "note"
%th{:style => "width: 4em;"}
%acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity_short'
%th{:style => "width: 5em;"}= t '.price_netto'
%th{:style => "width: 3.5em;"}= t 'simple_form.labels.defaults.tax'
%th{:style => "width: 4em;"}= t 'simple_form.labels.defaults.deposit'
%th= sort_link_helper heading_helper(Article, :article_category), "article_category"
%th= sort_link_helper heading_helper(Article, :unit), "unit"
%th= sort_link_helper heading_helper(Article, :note), "note"
%th{:style => "width: 4em;"}= heading_helper Article, :unit_quantity, short: true
%th{:style => "width: 5em;"}= heading_helper Article, :price
%th{:style => "width: 3.5em;"}= heading_helper Article, :tax
%th{:style => "width: 4em;"}= heading_helper Article, :deposit
%th{:style => "width: 3em;"}
%tbody#listbody

View file

@ -1,20 +1,16 @@
%table.table
%thead
%tr
%th
%acronym{:title => t('.available_desc')}= t '.available_short'
%th= t 'simple_form.labels.article.name'
%th= t 'simple_form.labels.article.unit'
%th
%acronym{:title => t('.price_desc')}= t '.price_short'
%th
%acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity_short'
%th
%acronym{:title => t('.order_number_desc')}= t '.order_number_short'
%th= t 'simple_form.labels.article.note'
%th= t 'simple_form.labels.article.article_category'
%th= t 'simple_form.labels.defaults.tax'
%th= t 'simple_form.labels.defaults.deposit'
%th= heading_helper Article, :availability, short: true
%th= heading_helper Article, :name
%th= heading_helper Article, :unit
%th= heading_helper Article, :price, short: true
%th= heading_helper Article, :unit_quantity, short: true
%th= heading_helper Article, :order_number, short: true
%th= heading_helper Article, :note
%th= heading_helper Article, :article_category
%th= heading_helper Article, :tax
%th= heading_helper Article, :deposit
%tbody
- @articles.each_with_index do |article, index|
= fields_for "articles[#{article.id || index}]", article do |form|

View file

@ -5,13 +5,13 @@
%table.table.table-striped
%thead
%tr
%th= t 'simple_form.labels.article.name'
%th= t 'simple_form.labels.article.origin'
%th= t 'simple_form.labels.article.manufacturer'
%th= t 'simple_form.labels.article.note'
%th{:style => "width:4em"}= t 'simple_form.labels.defaults.price'
%th= t 'simple_form.labels.article.unit'
%th= t 'simple_form.labels.defaults.unit_quantity'
%th= heading_helper Article, :name
%th= heading_helper Article, :origin
%th= heading_helper Article, :manufacturer
%th= heading_helper Article, :note
%th{:style => "width:4em"}= heading_helper Article, :price
%th= heading_helper Article, :unit
%th= heading_helper Article, :unit_quantity, short: true
%th
%tbody
- for article in @articles

View file

@ -1,4 +1,4 @@
- title 'Artikel mit externer Datenbank synchronisieren'
- title t('.title')
= form_tag update_synchronized_supplier_articles_path(@supplier) do
%h2= t '.outlist.title'
@ -11,30 +11,28 @@
= hidden_field_tag "outlisted_articles[#{article.id}]", '1'
= article.name
- if article.in_open_order
.alert
Achtung, #{article.name} wird gerade in einer laufenden Bestellung verwendet. Bitte erst Bestellung anpassen.
.alert= t '.alert_used', article: article.name
- else
%i= t '.outlist.body_skip'
%hr/
%h2= t '.update.title'
%p
%i
%b= @updated_articles.size
= t '.update.update_msg'
= t('.update.body').html_safe
= t '.update.update_msg', count: @updated_articles.size
= t '.update.body'
%table.table
%thead
%tr
%th= t 'simple_form.labels.article.name'
%th= t 'simple_form.labels.article.note'
%th= t 'simple_form.labels.article.manufacturer'
%th= t 'simple_form.labels.article.origin'
%th= t 'simple_form.labels.article.unit'
%th= t '.unit_quantity_short'
%th= t '.price_short'
%th= t 'simple_form.labels.defaults.tax'
%th= t 'simple_form.labels.defaults.deposit'
%th= t 'simple_form.labels.article.article_category'
%th= heading_helper Article, :name
%th= heading_helper Article, :note
%th= heading_helper Article, :manufacturer
%th= heading_helper Article, :origin
%th= heading_helper Article, :unit
%th= heading_helper Article, :unit_quantity, short: true
%th= heading_helper Article, :price
%th= heading_helper Article, :tax
%th= heading_helper Article, :deposit
%th= heading_helper Article, :article_category
%tbody
- @updated_articles.each do |updated_article, attrs|
- article = Article.find(updated_article.id)

View file

@ -2,19 +2,19 @@
= t('.body').html_safe
%pre
= [t('.fields.status'),
t('simple_form.labels.defaults.order_number'),
t('simple_form.labels.article.name'),
t('simple_form.labels.article.note'),
t('simple_form.labels.article.manufacturer'),
t('simple_form.labels.article.origin'),
t('simple_form.labels.article.unit'),
t('simple_form.labels.defaults.price'),
t('simple_form.labels.defaults.tax'),
t('simple_form.labels.defaults.deposit'),
t('simple_form.labels.defaults.unit_quantity'),
Article.human_attribute_name(:order_number),
Article.human_attribute_name(:name),
Article.human_attribute_name(:note),
Article.human_attribute_name(:manufacturer),
Article.human_attribute_name(:origin),
Article.human_attribute_name(:unit),
Article.human_attribute_name(:price),
Article.human_attribute_name(:tax),
Article.human_attribute_name(:deposit),
Article.human_attribute_name(:unit_quantity),
t('.fields.season_amount'),
t('.fields.season_price'),
t('simple_form.labels.article.article_category')].join(" | ")
Article.human_attribute_name(:article_category)].join(" | ")
= form_for :articles, :url => parse_upload_supplier_articles_path(@supplier),
:html => { :multipart => true } do |f|

View file

@ -61,8 +61,6 @@
return true;
}
});
enablePriceTooltips();
});
function mark_article_for_delivery(stock_article_id) {
@ -80,14 +78,6 @@
return ( 0 == $('#stock_change_stock_article_' + stock_article_id).length );
}
function enablePriceTooltips(context) {
$('[data-toggle~="tooltip"]', context).tooltip({
animation: false,
html: true,
placement: 'left'
});
}
= simple_form_for [@supplier, @delivery], validate: true do |f|
= f.error_notification
= base_errors f.object

View file

@ -5,21 +5,18 @@
$('#stock_changes tr').removeClass('success');
var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>');
if(null === quantity) {
return false;
}
var stock_change = $(
'<%= j(render(:partial => 'stock_change', :locals => {:stock_change => @stock_change})) %>'
).addClass('success');
enablePriceTooltips(stock_change);
$('input.stock-change-quantity', stock_change).val(quantity);
$('#stock_changes').append(stock_change);
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
updateSort('#stock_changes');
var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>'); <%# how to properly escape here? %>
if(null === quantity) {
stock_change.remove();
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
return false;
}
$('input.stock-change-quantity', stock_change).val(quantity);
})(window);

View file

@ -8,7 +8,6 @@ $('div.container-fluid').prepend(
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article})) %>'
).addClass('success');
enablePriceTooltips(stock_article_for_adding);
$('#stock_articles_for_adding tbody').append(stock_article_for_adding);
updateSort('#stock_articles_for_adding');

View file

@ -3,9 +3,9 @@
%table.table.table-striped
%thead
%tr
%th= t 'simple_form.labels.delivery.delivered_on'
%th= heading_helper Delivery, :delivered_on
%th.numeric= t 'deliveries.invoice_amount'
%th= t 'simple_form.labels.defaults.note'
%th= heading_helper Delivery, :note
%tbody
- for delivery in @deliveries
%tr

View file

@ -1,16 +1,16 @@
- title t('.title')
%dl
%dt= t 'simple_form.labels.delivery.supplier'
%dt= heading_helper Delivery, :supplier
%dd= @delivery.supplier.name
%dt= t 'simple_form.labels.delivery.delivered_on'
%dt= heading_helper Delivery, :delivered_on
%dd= @delivery.delivered_on
%dt= t 'deliveries.invoice_amount'
%dd= link_to_invoice(@delivery)
- if @delivery.invoice
%dt= t 'deliveries.invoice_net_amount'
%dd= number_to_currency @delivery.invoice.net_amount
%dt= t 'simple_form.labels.defaults.note'
%dt= heading_helper Delivery, :note
%dd= simple_format @delivery.note
%h2= t '.title_articles'

View file

@ -10,7 +10,6 @@ $('div.container-fluid').prepend(
var stock_article_for_adding = $(
'<%= j(render(:partial => 'stock_article_for_adding', :locals => {:article => @stock_article, :delivery => @delivery})) %>'
).addClass('success');
enablePriceTooltips(stock_article_for_adding);
$('#stock_article_<%= @stock_article.id %>').replaceWith(stock_article_for_adding);
updateSort('#stock_articles_for_adding');

View file

@ -5,12 +5,12 @@
var ordergroup = "#{escape_javascript(render('ordergroup'))}"
$(function() {
$('a[data-remove-transaction]').live('click', function() {
$(document).on('click', 'a[data-remove-transaction]', function() {
$(this).parents('tr').remove();
return false;
});
$('a[data-add-transaction]').click(function() {
$(document).on('click', 'a[data-add-transaction]', function() {
$('#ordergroups').append(ordergroup);
return false;
});

View file

@ -5,7 +5,7 @@
%h3= t('.amount_change_for', article: @order_article.article.name)
.modal-body
= form.input :ordergroup_id, as: :select, collection: Ordergroup.all.map { |g| [g.name, g.id] }
= form.input :result, hint: "Einheit: #{@order_article.article.unit}"
= form.input :result, hint: I18n.t('.result_hint', unit: @order_article.article.unit)
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= form.submit t('ui.save'), class: 'btn btn-primary'

View file

@ -5,14 +5,14 @@
%table.table.table-striped
%thead
%tr
%th= t 'simple_form.labels.invoice.number'
%th= t 'simple_form.labels.invoice.supplier'
%th= t 'simple_form.labels.invoice.date'
%th= t 'simple_form.labels.invoice.paid_on'
%th= t 'simple_form.labels.invoice.amount'
%th= t 'simple_form.labels.invoice.delivery'
%th= t 'simple_form.labels.invoice.order'
%th= t 'simple_form.labels.invoice.note'
%th= heading_helper Invoice, :number
%th= heading_helper Invoice, :supplier
%th= heading_helper Invoice, :date
%th= heading_helper Invoice, :paid_on
%th= heading_helper Invoice, :amount
%th= heading_helper Invoice, :delivery
%th= heading_helper Invoice, :order
%th= heading_helper Invoice, :note
%th
%th
%tbody

View file

@ -1,38 +1,38 @@
- title t('.title', number: @invoice.number)
%p
%b= t('simple_form.labels.invoice.supplier') + ':'
%b= heading_helper(Invoice, :supplier) + ':'
= @invoice.supplier.name
- if @invoice.delivery
%p
%b= t('simple_form.labels.invoice.delivery') + ':'
%b= heading_helper(Invoice, :delivery) + ':'
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
- if @invoice.order
%p
%b= t('simple_form.labels.invoice.order') + ':'
%b= heading_helper(Invoice, :order) + ':'
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), @invoice.order)).html_safe
%p
%b= t('simple_form.labels.invoice.number') + ':'
%b= heading_helper(Invoice, :number) + ':'
= @invoice.number
%p
%b= t('simple_form.labels.invoice.date') + ':'
%b= heading_helper(Invoice, :date) + ':'
= @invoice.date
%p
%b= t('simple_form.labels.invoice.paid_on') + ':'
%b= heading_helper(Invoice, :paid_on) + ':'
= @invoice.paid_on
%p
%b= t('simple_form.labels.invoice.amount') + ':'
%b= heading_helper(Invoice, :amount) + ':'
= number_to_currency @invoice.amount
%p
%b= t('simple_form.labels.invoice.deposit') + ':'
%b= heading_helper(Invoice, :deposit) + ':'
= number_to_currency @invoice.deposit
%p
%b= t('simple_form.labels.invoice.deposit_credit') + ':'
%b= heading_helper(Invoice, :deposit_credit) + ':'
= number_to_currency @invoice.deposit_credit
%p
%b= t('simple_form.labels.invoice.note') + ':'
%b= heading_helper(Invoice, :note) + ':'
=h @invoice.note
= link_to t('ui.edit'), edit_finance_invoice_path(@invoice)

View file

@ -11,7 +11,7 @@
= f.input :unit
- if @order_article.article.is_a?(StockArticle)
%div.alert Preise von Lagerartikeln können nicht geändert werden!
%div.alert= t '.stock_alert'
- else
= simple_fields_for :article_price, @order_article.article_price do |f|
= f.input :unit_quantity

View file

@ -5,12 +5,12 @@
%thead
%tr
- if FoodsoftConfig[:use_nick]
%th= t 'simple_form.labels.user.nick'
%th= t 'simple_form.labels.user.name'
%th= t 'simple_form.labels.user.email'
%th= t 'simple_form.labels.user.phone'
%th= t 'simple_form.labels.user.ordergroup'
%th= t 'simple_form.labels.user.workgroup', count: 3
%th= heading_helper User, :nick
%th= heading_helper User, :name
%th= heading_helper User, :email
%th= heading_helper User, :phone
%th= heading_helper User, :ordergroup
%th= heading_helper User, :workgroup, count: 3
%tbody
- for user in @users
%tr

View file

@ -3,16 +3,20 @@
$(function() {
#{data_to_js(@ordering_data)}
setGroupBalance(#{@ordering_data[:available_funds]});
setCurrencyFormat("#{t('number.currency.format.separator')}", #{t('number.currency.format.precision')}, "#{t('number.currency.format.unit')}");
setMinimumBalance(#{FoodsoftConfig[:minimum_balance] or 0});
setToleranceBehaviour(#{FoodsoftConfig[:tolerance_is_costly]});
setStockit(#{@order.stockit?});
// create List for search-feature (using list.js, http://listjs.com)
var listjsResetPlugin = ['reset', {highlightClass: 'btn-primary'}];
var listjsDelayPlugin = ['delay', {delayedSearchTime: 500}];
new List(document.body, { valueNames: ['name'], engine: 'unlist', plugins: [listjsResetPlugin, listjsDelayPlugin] });
});
- title t('.title'), false
.row-fluid
.well.pull-left
%button{type: "button", class: "close", data: {dismiss: 'alert'}}= '&times;'.html_safe
%h2= @order.name
%dl.dl-horizontal
- unless @order.note.blank?
@ -35,8 +39,17 @@
%dd= number_to_currency(@ordering_data[:available_funds])
.well.pull-right
%button{type: "button", class: "close", data: {dismiss: 'alert'}}= '&times;'.html_safe
= render 'switch_order', current_order: @order
.row-fluid
.well.clear
.form-search
.input-append
= text_field_tag :article, params[:article], placeholder: t('.search_article'), class: 'search-query delayed-search resettable'
%button.add-on.btn.reset-search{:type => :button, :title => t('.reset_article_search')}
%i.icon.icon-remove
= form_for @group_order do |f|
= f.hidden_field :lock_version
= f.hidden_field :order_id
@ -59,9 +72,9 @@
%th(style="width:20px")= t '.available'
%th#col_required= t '.amount'
%th{style: "width:15px;"}= t '.sum'
%tbody
%tbody.list
- @order.articles_grouped_by_category.each do |category, order_articles|
%tr.article-category
%tr.list-heading.article-category
%td
= category
%i.icon-tag

View file

@ -4,4 +4,4 @@
= form.hidden_field :group_id
= form.input :email
= form.submit t('.action')
= link_to t('.back'), :back
= link_to t('ui.or_cancel'), :back

View file

@ -22,7 +22,9 @@
Javascripts
\==================================================
/ Placed at the end of the document so the pages load faster
:javascript
I18n = {locale: '#{j(I18n.locale.to_s)}'}
= javascript_include_tag "application"
:javascript
I18n.defaultLocale = "#{I18n.default_locale}";
I18n.locale = "#{I18n.locale}";
I18n.fallbacks = true;
= yield(:javascript)

View file

@ -2,7 +2,7 @@
%h2= t '.title'
- if ordergroup.not_enough_apples?
.alert
= t '.not_enough_apples'
= t '.not_enough_apples'
- unless Order.open.empty?
%table.table.table-striped
%thead

View file

@ -3,5 +3,6 @@
= form.hidden_field :stock_article_id
= "Menge (#{stock_change.stock_article.quantity_available})"
= form.text_field :quantity, :size => 5, :autocomplete => 'off'
%b= stock_change.stock_article.name
= "(#{number_to_currency(stock_change.stock_article.price)} / #{stock_change.stock_article.unit})"
%span{:data => {:toggle => :tooltip, :title => render(:partial => 'shared/article_price_info', :locals => {:article => stock_change.stock_article})}}
%b= stock_change.stock_article.name
= "(#{number_to_currency(stock_change.stock_article.price)} / #{stock_change.stock_article.unit})"

View file

@ -11,7 +11,7 @@
%span.add-on %
= f.input :deposit
- else
= f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('.form.price_hint')
= f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('.price_hint')
= f.association :article_category
.form-actions
= f.submit class: 'btn'

View file

@ -1,17 +0,0 @@
- title t('.stock_changes', :article_name => @stock_article.name)
%table.table.table-hover#stock_changes
%thead
%tr
%th= t '.datetime'
%th= t '.reason'
%th= t '.change_quantity'
%th= t '.new_quantity'
%tbody
- reversed_history = @stock_article.quantity_history.reverse
- @stock_changes.each_with_index do |stock_change, index|
%tr
%td= l stock_change.created_at
%td= link_to_stock_change_reason(stock_change)
%td= stock_change.quantity
%td= reversed_history[index]

View file

@ -45,7 +45,7 @@
%tbody
- for article in @stock_articles
%tr{:class => stock_article_classes(article), :id => "stockArticle-#{article.id}"}
%td=h article.name
%td= link_to article.name, article
%td= article.quantity
%td= article.quantity - article.quantity_available
%th= article.quantity_available
@ -56,7 +56,6 @@
%td= article.article_category.name
%td
= link_to t('ui.edit'), edit_stock_article_path(article), class: 'btn btn-mini'
= link_to t('ui.history'), stock_article_history_path(article), class: 'btn btn-mini'
= link_to t('ui.delete'), article, :method => :delete, :confirm => t('.confirm_delete'),
class: 'btn btn-mini btn-danger', :remote => true
%p

View file

@ -0,0 +1,47 @@
- title @stock_article.name
.row-fluid
.span6
%dl.dl-horizontal
%dt= StockArticle.human_attribute_name 'supplier'
%dd= link_to @stock_article.supplier.name, @stock_article.supplier
%dt= StockArticle.human_attribute_name 'name'
%dd= @stock_article.name
%dt= StockArticle.human_attribute_name 'unit'
%dd= @stock_article.unit
%dt= StockArticle.human_attribute_name 'price'
%dd= number_to_currency @stock_article.price
%dt= StockArticle.human_attribute_name 'tax'
%dd= number_to_percentage @stock_article.tax
%dt= StockArticle.human_attribute_name 'deposit'
%dd= number_to_currency @stock_article.deposit
%dt= StockArticle.human_attribute_name 'fc_price'
%dd= number_to_currency @stock_article.fc_price
%dt= StockArticle.human_attribute_name 'article_category'
%dd= @stock_article.article_category.name
%dt= StockArticle.human_attribute_name 'note'
%dd= @stock_article.note
%dt= StockArticle.human_attribute_name 'quantity'
%dd= @stock_article.quantity
%dt= StockArticle.human_attribute_name 'quantity_available'
%dd= @stock_article.quantity_available
.form-actions
= link_to t('ui.edit'), edit_stock_article_path(@stock_article), class: 'btn'
.span6
%h2= t('.stock_changes')
%table.table.table-hover#stock_changes
%thead
%tr
%th= t '.datetime'
%th= t '.reason'
%th= t '.change_quantity'
%th= t '.new_quantity'
%tbody
- reversed_history = @stock_article.quantity_history.reverse
- @stock_changes.each_with_index do |stock_change, index|
%tr
%td= l stock_change.created_at
%td= link_to_stock_change_reason(stock_change)
%td= stock_change.quantity
%td= reversed_history[index]

View file

@ -1,7 +1,7 @@
= simple_form_for @supplier do |f|
- if @supplier.shared_supplier
.alert.alert-success
= t 'suppliers.shared_supplier_note'
.alert.alert-info
= t 'suppliers.shared_supplier_note'
= f.hidden_field :shared_supplier_id
= f.input :name
= f.input :address

View file

@ -6,9 +6,9 @@
%table.table.table-striped
%thead
%tr
%th= t 'simple_form.labels.supplier.name'
%th= t 'simple_form.labels.supplier.phone'
%th= t 'simple_form.labels.supplier.customer_number'
%th= heading_helper Supplier, :name
%th= heading_helper Supplier, :phone
%th= heading_helper Supplier, :customer_number, short: true
%th
%th
%th

View file

@ -4,11 +4,11 @@
%table.table.table-striped
%thead
%tr
%th= t 'simple_form.labels.supplier.name'
%th= t 'simple_form.labels.supplier.address'
%th= t 'simple_form.labels.supplier.note'
%th= t 'simple_form.labels.supplier.delivery_days'
%th= t 'simple_form.labels.supplier.is_subscribed'
%th= heading_helper Supplier, :name
%th= heading_helper Supplier, :address
%th= heading_helper Supplier, :note
%th= heading_helper Supplier, :delivery_days
%th= heading_helper Supplier, :is_subscribed
%tbody
- for shared_supplier in @shared_suppliers
%tr

View file

@ -4,32 +4,32 @@
.span6
- if shared_supplier = @supplier.shared_supplier
.alert.alert-info
= t 'suppliers.shared_supplier_note'
= t 'suppliers.shared_supplier_note'
%dl.dl-horizontal
%dt= t('simple_form.labels.supplier.address') + ':'
%dt= heading_helper(Supplier, :address) + ':'
%dd= @supplier.address
%dt= t('simple_form.labels.supplier.phone') + ':'
%dt= heading_helper(Supplier, :phone) + ':'
%dd= @supplier.phone
%dt= t('simple_form.labels.supplier.phone2') + ':'
%dt= heading_helper(Supplier, :phone2) + ':'
%dd= @supplier.phone2
%dt= t('simple_form.labels.supplier.fax') + ':'
%dt= heading_helper(Supplier, :fax) + ':'
%dd= @supplier.fax
%dt= t('simple_form.labels.supplier.email') + ':'
%dt= heading_helper(Supplier, :email) + ':'
%dd= @supplier.email
%dt= t('simple_form.labels.supplier.url') + ':'
%dt= heading_helper(Supplier, :url) + ':'
%dd= link_to @supplier.url, @supplier.url
%dt= t('simple_form.labels.supplier.contact_person') + ':'
%dt= heading_helper(Supplier, :contact_person) + ':'
%dd= @supplier.contact_person
%dt= t('simple_form.labels.supplier.customer_number') + ':'
%dt= heading_helper(Supplier, :customer_number) + ':'
%dd= @supplier.customer_number
%dt= t('simple_form.labels.supplier.delivery_days') + ':'
%dt= heading_helper(Supplier, :delivery_days) + ':'
%dd= @supplier.delivery_days
%dt= t('simple_form.labels.supplier.order_howto') + ':'
%dt= heading_helper(Supplier, :order_howto) + ':'
%dd= @supplier.order_howto
%dt= t('simple_form.labels.supplier.note') + ':'
%dt= heading_helper(Supplier, :note) + ':'
%dd= @supplier.note
%dt= t('simple_form.labels.supplier.min_order_quantity') + ':'
%dt= heading_helper(Supplier, :min_order_quantity) + ':'
%dd= @supplier.min_order_quantity
.clearfix
@ -43,8 +43,8 @@
%table.table.table-horizontal
%thead
%tr
%th= t 'simple_form.labels.defaults.date'
%th= t 'simple_form.labels.defaults.amount'
%th= heading_helper Delivery, :date
%th= heading_helper Delivery, :amount
%tbody
- for delivery in @deliveries
%tr

View file

@ -3,22 +3,22 @@
%section
%dl.dl-horizontal
%dt= t 'simple_form.labels.task.name'
%dt= Task.human_attribute_name(:name)
%dd= @task.name
- if @task.description.present?
%dt= t 'simple_form.labels.defaults.description'
%dt= Task.human_attribute_name(:description)
%dd= simple_format(@task.description)
- if @task.due_date.present?
%dt= t '.due_date'
%dt= Task.human_attribute_name(:due_date)
%dd
= format_date(@task.due_date)
- if @task.periodic?
%i.icon-repeat{title: t('tasks.repeated')}
%dt= t 'simple_form.labels.task.duration'
%dt= Task.human_attribute_name(:duration)
%dd= t('.hours', count: @task.duration)
%dt= t 'simple_form.labels.task.user_list'
%dt= Task.human_attribute_name(:user_list)
%dd= task_assignments(@task)
%dt= t 'simple_form.labels.task.workgroup'
%dt= Task.human_attribute_name(:workgroup)
%dd
- if @task.workgroup
= link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id)
@ -30,7 +30,7 @@
- unless @task.done?
= link_to t('.mark_done'), set_done_task_path(@task), method: :post, class: 'btn'
= link_to t('ui.edit'), edit_task_path(@task), class: 'btn'
= link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
= link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => t('.confirm_delete_single'),
class: 'btn btn-danger'
- if @task.periodic?
= link_to t('.delete_group'), task_path(@task, periodic: true), method: :delete,