From 515e7fb6916f82766f535613817c468c30c5c132 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 4 Jan 2016 22:37:06 -0500 Subject: [PATCH] Started working on the QBO index page --- app/controllers/qbo_controller.rb | 7 +++++-- app/views/qbo/index.html.erb | 8 +++++++- config/routes.rb | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/controllers/qbo_controller.rb b/app/controllers/qbo_controller.rb index fec800b..2cf74bf 100644 --- a/app/controllers/qbo_controller.rb +++ b/app/controllers/qbo_controller.rb @@ -22,8 +22,11 @@ class QboController < ApplicationController :access_token_path => "/oauth/v1/get_access_token" }) - + # + # Called when the QBO Top Menu us shown + # def index + @qbo_customer_count = QboCustomers.count end # @@ -82,6 +85,6 @@ class QboController < ApplicationController } end - redirect_to plugin_settings_path(:redmine_qbo), :flash => { :notice => "Successfully synced to Quickbooks" } + redirect_to qbo_path(:redmine_qbo), :flash => { :notice => "Successfully synced to Quickbooks" } end end diff --git a/app/views/qbo/index.html.erb b/app/views/qbo/index.html.erb index 20e6aae..7d65bad 100644 --- a/app/views/qbo/index.html.erb +++ b/app/views/qbo/index.html.erb @@ -12,6 +12,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI -

QboController#index

+

Redmine Quickbooks

+ + Customer Count: <%= @qbo_customer_count %> + +
+
+ <%= link_to "Sync", qbo_sync_path %> diff --git a/config/routes.rb b/config/routes.rb index 8becefc..68fe3bd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,4 +14,5 @@ get 'qbo', :to=> 'qbo#index' get 'qbo/authenticate', :to => 'qbo#authenticate' get 'qbo/oauth_callback', :to => 'qbo#oauth_callback' -get 'qop/qbo_sync', :to => 'qbo#sync' +get 'qbo/sync', :to => 'qbo#sync' +