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