Introduced actionbar. Some fixes for balancing page.
This commit is contained in:
parent
1d9815731c
commit
f4f10b1e4c
26 changed files with 90 additions and 78 deletions
|
@ -9,7 +9,7 @@ class Ordergroup < Group
|
||||||
acts_as_paranoid # Avoid deleting the ordergroup for consistency of order-results
|
acts_as_paranoid # Avoid deleting the ordergroup for consistency of order-results
|
||||||
serialize :stats
|
serialize :stats
|
||||||
|
|
||||||
has_many :financial_transactions, :order => "created_on DESC"
|
has_many :financial_transactions
|
||||||
has_many :group_orders
|
has_many :group_orders
|
||||||
has_many :orders, :through => :group_orders
|
has_many :orders, :through => :group_orders
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
- title "Bestellgruppen"
|
- title "Bestellgruppen"
|
||||||
|
|
||||||
|
- content_for :actionbar do
|
||||||
|
= link_to "Neue Bestellgruppe anlegen", new_admin_ordergroup_path, class: 'btn btn-primary'
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :sidebar do
|
||||||
%p= link_to "Neue Bestellgruppe anlegen", new_admin_ordergroup_path, class: 'btn btn-primary'
|
|
||||||
%p
|
%p
|
||||||
Hier kannst du
|
Hier kannst du
|
||||||
= link_to 'neue Bestellgruppen', new_admin_ordergroup_path
|
= link_to 'neue Bestellgruppen', new_admin_ordergroup_path
|
||||||
|
|
|
@ -9,16 +9,15 @@
|
||||||
%th Email
|
%th Email
|
||||||
%th Zugriff auf
|
%th Zugriff auf
|
||||||
%th Letzter login
|
%th Letzter login
|
||||||
%th Aktionen
|
%th(colspan="2") Aktionen
|
||||||
%tbody
|
%tbody
|
||||||
- for user in @users
|
- for user in @users
|
||||||
%tr
|
%tr
|
||||||
%td= link_to user.nick, [:admin, user]
|
%td= link_to user.nick, [:admin, user]
|
||||||
%td=h user.name
|
%td= user.name
|
||||||
%td=h user.email
|
%td= user.email
|
||||||
%td=h format_roles(user)
|
%td= format_roles(user)
|
||||||
%td=h format_time(user.last_login)
|
%td= format_time(user.last_login)
|
||||||
%td
|
%td= link_to 'Bearbeiten', edit_admin_user_path(user), class: 'btn btn-mini'
|
||||||
= link_to 'Bearbeiten', edit_admin_user_path(user), class: 'btn btn-mini'
|
%td= link_to 'Löschen', [:admin, user], :confirm => "Willst du #{user.name} wirklich löschen?",
|
||||||
= link_to 'Löschen', [:admin, user], :confirm => "Willst du #{user.name} wirklich löschen?",
|
|
||||||
:method => :delete, class: 'btn btn-danger btn-mini'
|
:method => :delete, class: 'btn btn-danger btn-mini'
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
- title "Admin/Benutzerinnen"
|
- title "Admin/Benutzerinnen"
|
||||||
|
|
||||||
|
- content_for :actionbar do
|
||||||
|
= link_to 'Neue Benutzerin anlegen', new_admin_user_path, class: 'btn btn-primary'
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :sidebar do
|
||||||
%p= link_to 'Neue Benutzerin anlegen', new_admin_user_path, class: 'btn btn-primary'
|
|
||||||
%p
|
%p
|
||||||
Hier kannst du Benutzer_innen #{link_to 'neu Anlegen', new_admin_user_path},
|
Hier kannst du Benutzer_innen #{link_to 'neu Anlegen', new_admin_user_path},
|
||||||
bearbeiten und natürlich auch löschen.
|
bearbeiten und natürlich auch löschen.
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
- title "Arbeitsgruppen"
|
- title "Arbeitsgruppen"
|
||||||
|
|
||||||
|
- content_for :actionbar do
|
||||||
|
= link_to "Neue Arbeitsgruppe anlegen", new_admin_workgroup_path, class: 'btn btn-primary'
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :sidebar do
|
||||||
%p= link_to "Neue Arbeitsgruppe anlegen", new_admin_workgroup_path, class: 'btn btn-primary'
|
|
||||||
%p
|
%p
|
||||||
Hier kannst du
|
Hier kannst du
|
||||||
= link_to 'neue Arbeitsgruppen', new_admin_workgroup_path
|
= link_to 'neue Arbeitsgruppen', new_admin_workgroup_path
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
%h3 Bestellung bearbeiten
|
|
||||||
|
|
||||||
%table.ordered-articles.table.table-striped
|
%table.ordered-articles.table.table-striped
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
|
|
|
@ -22,28 +22,26 @@
|
||||||
%h3 Kommentare
|
%h3 Kommentare
|
||||||
#comments= render :partial => 'shared/comments', locals: {comments: @order.comments}
|
#comments= render :partial => 'shared/comments', locals: {comments: @order.comments}
|
||||||
|
|
||||||
.well.well-small
|
- content_for :actionbar do
|
||||||
.btn-toolbar
|
.btn-group
|
||||||
.btn-group
|
- unless @order.invoice or @order.stockit?
|
||||||
- unless @order.invoice or @order.stockit?
|
= link_to "Rechnung anlegen", new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier),
|
||||||
= link_to "Rechnung anlegen", new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier),
|
class: 'btn'
|
||||||
class: 'btn'
|
- unless @order.closed?
|
||||||
- unless @order.closed?
|
= link_to "Bestellung abschließen", confirm_finance_order_path(@order), class: 'btn btn-primary'
|
||||||
= link_to "Bestellung abschließen", confirm_finance_order_path(@order), class: 'btn btn-primary'
|
|
||||||
|
|
||||||
#editOrderNav.btn-group.pull-right
|
#editOrderNav.btn-group.pull-right
|
||||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
|
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
|
||||||
Ansichtsoptionen
|
Ansichtsoptionen
|
||||||
%span.caret
|
%span.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
%li= link_to 'Bestellung bearbeiten', new_finance_order_path(order_id: @order.id, view: 'edit_results'),
|
%li= link_to 'Bestellung bearbeiten', new_finance_order_path(order_id: @order.id, view: 'edit_results'),
|
||||||
remote: true
|
remote: true
|
||||||
%li= link_to 'Gruppenübersicht', new_finance_order_path(order_id: @order.id, view: 'groups_overview'),
|
%li= link_to 'Gruppenübersicht', new_finance_order_path(order_id: @order.id, view: 'groups_overview'),
|
||||||
remote: true
|
remote: true
|
||||||
%li= link_to 'Artikelübersicht', new_finance_order_path(order_id: @order.id, view: 'articles_overview'),
|
%li= link_to 'Artikelübersicht', new_finance_order_path(order_id: @order.id, view: 'articles_overview'),
|
||||||
remote: true
|
remote: true
|
||||||
|
|
||||||
%section#results
|
%section#results
|
||||||
= render 'edit_results_by_articles'
|
= render 'edit_results_by_articles'
|
||||||
%p= link_to_top
|
%p= link_to_top
|
||||||
#edit_box{:style => 'display:none'}
|
|
|
@ -1,7 +1,9 @@
|
||||||
- title "Kontoauszug für #{@ordergroup.name}"
|
- title "Kontoauszug für #{@ordergroup.name}"
|
||||||
|
|
||||||
|
- content_for :actionbar do
|
||||||
|
= link_to 'Neue Transaktion anlegen', new_finance_ordergroup_transaction_path(@ordergroup), class: 'btn btn-primary'
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :sidebar do
|
||||||
%p= link_to 'Neue Transaktion anlegen', new_finance_ordergroup_transaction_path(@ordergroup), class: 'btn btn-primary'
|
|
||||||
.well.well-small
|
.well.well-small
|
||||||
%strong Kontostand: #{number_to_currency(@ordergroup.account_balance)}
|
%strong Kontostand: #{number_to_currency(@ordergroup.account_balance)}
|
||||||
%br/
|
%br/
|
||||||
|
|
|
@ -7,5 +7,6 @@
|
||||||
= f.hidden_field :ordergroup_id
|
= f.hidden_field :ordergroup_id
|
||||||
= f.input :amount
|
= f.input :amount
|
||||||
= f.input :note, :as => :text
|
= f.input :note, :as => :text
|
||||||
= f.submit
|
.form-actions
|
||||||
= link_to "oder abbrechen", finance_ordergroup_transactions_path(@ordergroup)
|
= f.submit class: 'btn btn-primary'
|
||||||
|
= link_to "oder abbrechen", finance_ordergroup_transactions_path(@ordergroup)
|
|
@ -1,3 +1,4 @@
|
||||||
$('#modalContainer').modal('hide');
|
$('#modalContainer').modal('hide');
|
||||||
$('#order_article_#{@order_article.id}').html('#{j(render('finance/balancing/order_article', order_article: @order_article))}');
|
$('#order_article_#{@order_article.id}').html('#{j(render('finance/balancing/order_article', order_article: @order_article))}');
|
||||||
$('#group_order_articles_#{@order_article.id}').html('#{j(render('finance/balancing/group_order_articles', order_article: @order_article))}');
|
$('#group_order_articles_#{@order_article.id}').html('#{j(render('finance/balancing/group_order_articles', order_article: @order_article))}');
|
||||||
|
$('#summary').html('#{j(render('finance/balancing/summary', order: @order_article.order))}');
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- title "Rechnungen"
|
- title "Rechnungen"
|
||||||
|
|
||||||
= link_to 'Neue Rechnung anlegen', new_finance_invoice_path, class: 'btn btn-primary'
|
- content_for :actionbar do
|
||||||
|
= link_to 'Neue Rechnung anlegen', new_finance_invoice_path, class: 'btn btn-primary'
|
||||||
|
|
||||||
#invoicesTable= render 'invoices'
|
#invoicesTable= render 'invoices'
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
- title "Konten verwalten"
|
- title "Konten verwalten"
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :actionbar do
|
||||||
.well.well-small
|
= link_to "Neue Überweisungen eingeben", finance_new_transaction_collection_path, class: 'btn btn-primary'
|
||||||
Hier kannst du mehrere Transaktionen gleichzeitig anlegen:
|
|
||||||
= link_to "Neue Überweisungen eingeben", finance_new_transaction_collection_path, class: 'btn btn-primary'
|
|
||||||
|
|
||||||
.well.well-small
|
.well.well-small
|
||||||
= form_tag finance_ordergroups_path, :method => :get, :remote => true,
|
= form_tag finance_ordergroups_path, :method => :get, :remote => true,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- title "Bestellüberblick"
|
- title "Bestellüberblick", false
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :sidebar do
|
||||||
.well.well-small
|
.well.well-small
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
%th Wer
|
%th Wer
|
||||||
%th Notiz
|
%th Notiz
|
||||||
%th Betrag
|
%th Betrag
|
||||||
- for ft in current_user.ordergroup.financial_transactions.limit(5)
|
- for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC')
|
||||||
%tr
|
%tr
|
||||||
%td= format_time(ft.created_on)
|
%td= format_time(ft.created_on)
|
||||||
%td= h(ft.user.nil? ? '?' : ft.user.nick)
|
%td= h(ft.user.nil? ? '?' : ft.user.nick)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
-title "Meine Bestellgruppe"
|
- title "Meine Bestellgruppe", false
|
||||||
|
|
||||||
.row-fluid
|
.row-fluid
|
||||||
.span4
|
.span4
|
||||||
|
@ -11,10 +11,10 @@
|
||||||
%b Verfügbares Guthaben:
|
%b Verfügbares Guthaben:
|
||||||
= number_to_currency(@ordergroup.get_available_funds())
|
= number_to_currency(@ordergroup.get_available_funds())
|
||||||
%h2 Personen
|
%h2 Personen
|
||||||
%ul{:style => "list-style-type:decimal;"}
|
%ul
|
||||||
- for membership in @ordergroup.memberships
|
- for membership in @ordergroup.memberships
|
||||||
%li= membership.user.nick
|
%li= membership.user.nick
|
||||||
= link_to('Person einladen', new_invite_path(:id => @ordergroup), :remote => true)
|
= link_to 'Neue Person einladen', new_invite_path(:id => @ordergroup), :remote => true, class: 'btn btn-primary'
|
||||||
.span8
|
.span8
|
||||||
%h2 Kontoauszug
|
%h2 Kontoauszug
|
||||||
.well.well-small
|
.well.well-small
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
= simple_form_for @invite, remote: true do |form|
|
= simple_form_for @invite, remote: true do |form|
|
||||||
.modal-header
|
.modal-header
|
||||||
= button_tag "x", class: 'close', data: {dismiss: 'modal'}
|
= button_tag "x", class: 'close', data: {dismiss: 'modal'}
|
||||||
%h3 Person in die Gruppe #{@invite.group.name} einladen
|
%h3 Person einladen
|
||||||
.modal-body
|
.modal-body
|
||||||
|
%p
|
||||||
|
Hier kannst du eine Person in die Gruppe
|
||||||
|
%b=h @invite.group.name
|
||||||
|
einladen, die noch nicht Mitglied der Foodcoop ist.
|
||||||
|
%br/
|
||||||
|
Die Person ist dann nach erstmaliger Anmeldung automatisch Mitglied dieser Gruppe.
|
||||||
= form.hidden_field :user_id
|
= form.hidden_field :user_id
|
||||||
= form.hidden_field :group_id
|
= form.hidden_field :group_id
|
||||||
= form.input :email
|
= form.input :email
|
||||||
|
|
|
@ -19,12 +19,16 @@
|
||||||
= yield(:sidebar)
|
= yield(:sidebar)
|
||||||
.span9
|
.span9
|
||||||
= bootstrap_flash
|
= bootstrap_flash
|
||||||
|
- if content_for?(:actionbar)
|
||||||
|
.btn-toolbar.pull-right= yield(:actionbar)
|
||||||
- if show_title?
|
- if show_title?
|
||||||
.page-header
|
.page-header
|
||||||
%h1= yield(:title)
|
%h1= yield(:title)
|
||||||
= yield
|
= yield
|
||||||
- else
|
- else
|
||||||
= bootstrap_flash
|
= bootstrap_flash
|
||||||
|
- if content_for?(:actionbar)
|
||||||
|
.btn-toolbar.pull-right= yield(:actionbar)
|
||||||
- if show_title?
|
- if show_title?
|
||||||
.page-header
|
.page-header
|
||||||
%h1= yield(:title)
|
%h1= yield(:title)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- title "Nachrichten"
|
- title "Nachrichten"
|
||||||
|
|
||||||
= link_to 'Neue Nachricht', new_message_path, class: 'btn btn-primary'
|
- content_for :actionbar do
|
||||||
|
= link_to 'Neue Nachricht', new_message_path, class: 'btn btn-primary'
|
||||||
#messages
|
#messages
|
||||||
= render 'messages', messages: @messages, pagination: true
|
= render 'messages', messages: @messages, pagination: true
|
|
@ -1,14 +1,15 @@
|
||||||
- title "Bestellungen verwalten"
|
- title "Bestellungen verwalten"
|
||||||
|
|
||||||
.well
|
- content_for :actionbar do
|
||||||
.btn-group.pull-right
|
.btn-group
|
||||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-primary dropdown-toggle' do
|
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-primary dropdown-toggle' do
|
||||||
Neue Bestellung für ..
|
Neue Bestellung anlegen
|
||||||
%span.caret
|
%span.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
- Supplier.all.each do |supplier|
|
- Supplier.all.each do |supplier|
|
||||||
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
|
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
|
||||||
|
|
||||||
|
.well
|
||||||
%h2 Laufende Bestellungen
|
%h2 Laufende Bestellungen
|
||||||
- unless @open_orders.empty?
|
- unless @open_orders.empty?
|
||||||
%table.table.table-striped
|
%table.table.table-striped
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
%td= format_time(order.ends) unless order.ends.nil?
|
%td= format_time(order.ends) unless order.ends.nil?
|
||||||
%td= truncate(order.note)
|
%td= truncate(order.note)
|
||||||
%td= link_to "Beenden", finish_order_path(order),
|
%td= link_to "Beenden", finish_order_path(order),
|
||||||
confirm: "Willst Du wirklich die Bestellung \"#{order.name}\" beenden?\nEs gibt kein zurück.",
|
confirm: "Willst Du wirklich die Bestellung \"#{order.name}\" beenden? Es gibt kein zurück.",
|
||||||
method: :post, class: 'btn btn-small btn-success'
|
method: :post, class: 'btn btn-small btn-success'
|
||||||
|
|
||||||
%td
|
%td
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
- title "Lieferanten"
|
- title "Lieferanten"
|
||||||
|
|
||||||
%p
|
- content_for :actionbar do
|
||||||
= link_to 'Neue Lieferantin anlegen', new_supplier_path, class: 'btn btn-primary'
|
= link_to 'Neue Lieferantin anlegen', new_supplier_path, class: 'btn btn-primary'
|
||||||
oder
|
= link_to 'Lieferantin aus externer Datenbank importieren', shared_suppliers_suppliers_path, class: 'btn'
|
||||||
= link_to 'importiere', shared_suppliers_suppliers_path
|
|
||||||
aus der externen Artikeldatenbank.
|
|
||||||
%table.table.table-striped
|
%table.table.table-striped
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
%p= link_to "Neue Aufgabe erstellen", new_task_path, class: 'btn btn-primary'
|
- content_for :actionbar do
|
||||||
.well.well-small
|
= link_to "Neue Aufgabe erstellen", new_task_path, class: 'btn btn-primary'
|
||||||
%ul.nav.nav-list
|
|
||||||
%li.nav-header Seiten
|
- content_for :sidebar do
|
||||||
%li= link_to "Meine Aufgaben", user_tasks_path
|
.well.well-small
|
||||||
%li= link_to "Alle Aufgaben", tasks_path
|
%ul.nav.nav-list
|
||||||
%li= link_to "Erledigte Aufgaben (Archiv)", archive_tasks_path
|
%li.nav-header Seiten
|
||||||
%li.nav-header Gruppenaufgaben
|
%li= link_to "Meine Aufgaben", user_tasks_path
|
||||||
- for group in Workgroup.all
|
%li= link_to "Alle Aufgaben", tasks_path
|
||||||
%li= link_to group.name, workgroup_tasks_path(workgroup_id: group.id)
|
%li= link_to "Erledigte Aufgaben (Archiv)", archive_tasks_path
|
||||||
|
%li.nav-header Gruppenaufgaben
|
||||||
|
- for group in Workgroup.all
|
||||||
|
%li= link_to group.name, workgroup_tasks_path(workgroup_id: group.id)
|
|
@ -1,5 +1,4 @@
|
||||||
- title "Aufgabenarchiv"
|
- title "Aufgabenarchiv"
|
||||||
- content_for :sidebar do
|
= render 'nav'
|
||||||
= render 'nav'
|
|
||||||
|
|
||||||
#tasks= render 'archive_tasks'
|
#tasks= render 'archive_tasks'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
- title "Aufgaben"
|
- title "Aufgaben"
|
||||||
- content_for :sidebar do
|
= render 'nav'
|
||||||
= render 'nav'
|
|
||||||
|
|
||||||
- unless @non_group_tasks.empty?
|
- unless @non_group_tasks.empty?
|
||||||
%section
|
%section
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
- title "Aufgabe anzeigen"
|
- title "Aufgabe anzeigen"
|
||||||
- content_for :sidebar do
|
= render 'nav'
|
||||||
= render 'nav'
|
|
||||||
|
|
||||||
%section
|
%section
|
||||||
%dl.dl-horizontal
|
%dl.dl-horizontal
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
- title "Meine Aufgaben"
|
- title "Meine Aufgaben"
|
||||||
- content_for :sidebar do
|
= render 'nav'
|
||||||
= render 'nav'
|
|
||||||
|
|
||||||
- unless @unaccepted_tasks.empty?
|
- unless @unaccepted_tasks.empty?
|
||||||
%section
|
%section
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
- title "Aufgaben für #{@group.name}"
|
- title "Aufgaben für #{@group.name}"
|
||||||
- content_for :sidebar do
|
= render 'nav'
|
||||||
= render 'nav'
|
|
||||||
|
|
||||||
%section.well
|
%section.well
|
||||||
%h3 Wöchentliche Aufgaben
|
%h3 Wöchentliche Aufgaben
|
||||||
|
|
Loading…
Reference in a new issue