mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Merge branch 'master' of github.com:hillelcoren/invoice-ninja
This commit is contained in:
commit
7d48d9d138
3
.gitignore
vendored
3
.gitignore
vendored
@ -17,4 +17,5 @@
|
||||
/ninja.sublime-workspace
|
||||
/tests/_log
|
||||
.idea
|
||||
.project
|
||||
.project
|
||||
/nbproject/private/
|
28
Gruntfile.js
28
Gruntfile.js
@ -3,10 +3,21 @@ module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
concat: {
|
||||
options: {
|
||||
process: function(src, filepath) {
|
||||
// Fix path for image and font resources
|
||||
if(filepath.indexOf('.css', filepath.length - 4) !== -1) {
|
||||
return src.replace(/\.\.\/(images|fonts)\//g, '$1/');
|
||||
// Don't do anything for unknown file types
|
||||
} else {
|
||||
return src;
|
||||
}
|
||||
},
|
||||
},
|
||||
js: {
|
||||
src: [
|
||||
'public/vendor/jquery/dist/jquery.js',
|
||||
'public/vendor/jquery-ui/ui/minified/jquery-ui.min.js',
|
||||
'public/vendor/jquery-ui/jquery-ui.min.js',
|
||||
'public/vendor/bootstrap/dist/js/bootstrap.min.js',
|
||||
'public/vendor/datatables/media/js/jquery.dataTables.js',
|
||||
'public/vendor/datatables-bootstrap3/BS3/assets/js/datatables.js',
|
||||
@ -24,7 +35,8 @@ module.exports = function(grunt) {
|
||||
//'public/js/jspdf.plugin.split_text_to_size.js',
|
||||
'public/js/script.js',
|
||||
],
|
||||
dest: 'public/built.js'
|
||||
dest: 'public/built.js',
|
||||
nonull: true
|
||||
},
|
||||
css: {
|
||||
src: [
|
||||
@ -37,8 +49,9 @@ module.exports = function(grunt) {
|
||||
'public/css/bootstrap-combobox.css',
|
||||
'public/css/typeahead.js-bootstrap.css',
|
||||
'public/css/style.css',
|
||||
],
|
||||
dest: 'public/built.css'
|
||||
],
|
||||
dest: 'public/built.css',
|
||||
nonull: true
|
||||
},
|
||||
css_public: {
|
||||
src: [
|
||||
@ -46,13 +59,14 @@ module.exports = function(grunt) {
|
||||
'public/css/bootstrap.splash.css',
|
||||
'public/css/splash.css',
|
||||
],
|
||||
dest: 'public/built.public.css'
|
||||
dest: 'public/built.public.css',
|
||||
nonull: true
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
|
||||
grunt.registerTask('default', ['concat']);
|
||||
|
||||
};
|
||||
};
|
||||
|
45
README.md
45
README.md
@ -8,12 +8,11 @@ Most online invoicing sites are expensive. They shouldn't be. The aim of this pr
|
||||
|
||||
[This guide](http://hillelcoren.com/invoice-ninja/self-hosting/) is the simplest way to setup the site. The high level instructions for setting up the site using Git are below but there's also a more detailed [setup guide](http://hillelcoren.com/invoice-ninja/laravel-ubuntu-virtualbox/).
|
||||
|
||||
If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files. To make changes locally you'll need to run `bowser install` to download the JavaScript dependencies and then `grunt` to build the JS and CSS files.
|
||||
|
||||
To connect follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja).
|
||||
|
||||
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
|
||||
If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files.
|
||||
|
||||
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
|
||||
|
||||
### Features
|
||||
* Core application built using Laravel 4.1
|
||||
@ -26,7 +25,7 @@ Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
|
||||
|
||||
If you plan on submitting changes it's best to [fork the repo](https://help.github.com/articles/fork-a-repo), otherwise you can just checkout the code.
|
||||
|
||||
git clone git@github.com:hillelcoren/invoice-ninja.git ninja
|
||||
git clone https://github.com/hillelcoren/invoice-ninja.git ninja
|
||||
cd ninja
|
||||
|
||||
Install Laravel packages using Composer
|
||||
@ -35,10 +34,29 @@ Note: you may be prompted for your Github user/pass due to their API limits.
|
||||
|
||||
composer install
|
||||
|
||||
Configure config/database.php and config/mail.php and initialize the database.
|
||||
Install JavaScript and HTML packages using Bower
|
||||
|
||||
bower install
|
||||
|
||||
Create the development environment configurations
|
||||
|
||||
mkdir app/config/development
|
||||
cp app/config/app.php app/config/development/
|
||||
cp app/config/database.php app/config/development/
|
||||
cp app/config/mail.php app/config/development/
|
||||
|
||||
Create database user and a database for ninja
|
||||
|
||||
CREATE SCHEMA `ninja` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
CREATE USER 'ninja'@'localhost' IDENTIFIED BY 'ninja';
|
||||
GRANT ALL PRIVILEGES ON `ninja`.* TO 'ninja'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
Configure development/config/database.php and development/config/mail.php and initialize the database.
|
||||
|
||||
php artisan migrate --seed
|
||||
|
||||
Add public/ to your web server root
|
||||
|
||||
### Frameworks/Libraries
|
||||
* [laravel/laravel](https://github.com/laravel/laravel) - A PHP Framework For Web Artisans
|
||||
@ -69,4 +87,19 @@ Configure config/database.php and config/mail.php and initialize the database.
|
||||
* [jashkenas/underscore](https://github.com/jashkenas/underscore) - JavaScript's utility _ belt
|
||||
* [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) - List of languages for Laravel4
|
||||
* [calvinfroedge/PHP-Payments](https://github.com/calvinfroedge/PHP-Payments) - A uniform payments interface for PHP
|
||||
* [bgrins/spectrum](https://github.com/bgrins/spectrum) - The No Hassle JavaScript Colorpicker
|
||||
* [bgrins/spectrum](https://github.com/bgrins/spectrum) - The No Hassle JavaScript Colorpicker
|
||||
|
||||
### Ubuntu Notes
|
||||
|
||||
# Install php-mcrypt
|
||||
apt-get install php5-mcrypt
|
||||
sudo php5enmod mcrypt
|
||||
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
sudo mv composer.phar /usr/local/bin/composer
|
||||
|
||||
# Install Bower
|
||||
sudo apt-get install npm nodejs-legacy
|
||||
sudo npm install -g bower
|
||||
sudo ln -s /usr/local/lib/node_modules/bower/bin/bower /usr/local/bin/bower
|
||||
|
@ -63,6 +63,8 @@ return array(
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
| Command below will generate a random 32 character alphanumeric string
|
||||
| cat /dev/random | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
|
||||
*/
|
||||
|
||||
'key' => '',
|
||||
@ -219,4 +221,4 @@ return array(
|
||||
'Carbon' => 'Carbon\Carbon',
|
||||
'Rocketeer' => 'Rocketeer\Facades\Rocketeer',
|
||||
),
|
||||
);
|
||||
);
|
||||
|
@ -134,7 +134,7 @@ class AccountController extends \BaseController {
|
||||
$arrayItem = array(
|
||||
'value' => $recommendedGateway->id,
|
||||
'other' => 'false',
|
||||
'data-imageUrl' => $recommendedGateway->getLogoUrl(),
|
||||
'data-imageUrl' => asset($recommendedGateway->getLogoUrl()),
|
||||
'data-siteUrl' => $recommendedGateway->site_url
|
||||
);
|
||||
$recommendedGatewayArray[$recommendedGateway->name] = $arrayItem;
|
||||
|
@ -69,7 +69,13 @@ App::after(function($request, $response)
|
||||
|
||||
Route::filter('auth', function()
|
||||
{
|
||||
if (Auth::guest()) return Redirect::guest('/');
|
||||
if (Auth::guest()) {
|
||||
if(Utils::isNinja()) {
|
||||
return Redirect::guest('/');
|
||||
} else {
|
||||
return Redirect::guest('/login');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ class Utils
|
||||
{
|
||||
return isset($_ENV['DISABLE_REGISTRATION']) && $_ENV['DISABLE_REGISTRATION'];
|
||||
}
|
||||
|
||||
|
||||
public static function isPro()
|
||||
{
|
||||
return Auth::check() && Auth::user()->isPro();
|
||||
|
@ -22,30 +22,35 @@
|
||||
//dd(gethostname());
|
||||
//Log::error('test');
|
||||
|
||||
if(Utils::isNinja()) {
|
||||
Route::get('/', 'HomeController@showWelcome');
|
||||
Route::get('/rocksteady', 'HomeController@showWelcome');
|
||||
Route::get('/about', 'HomeController@showAboutUs');
|
||||
Route::get('/terms', 'HomeController@showTerms');
|
||||
Route::get('/contact', 'HomeController@showContactUs');
|
||||
Route::get('/plans', 'HomeController@showPlans');
|
||||
Route::post('/contact_submit', 'HomeController@doContactUs');
|
||||
Route::get('/faq', 'HomeController@showFaq');
|
||||
Route::get('/features', 'HomeController@showFeatures');
|
||||
Route::get('/secure_payment', 'HomeController@showSecurePayment');
|
||||
Route::get('/testimonials', 'HomeController@showTestimonials');
|
||||
|
||||
Route::get('/', 'HomeController@showWelcome');
|
||||
Route::get('/rocksteady', 'HomeController@showWelcome');
|
||||
Route::get('/about', 'HomeController@showAboutUs');
|
||||
Route::get('/terms', 'HomeController@showTerms');
|
||||
Route::get('/contact', 'HomeController@showContactUs');
|
||||
Route::get('/plans', 'HomeController@showPlans');
|
||||
Route::post('/contact_submit', 'HomeController@doContactUs');
|
||||
Route::get('/faq', 'HomeController@showFaq');
|
||||
Route::get('/features', 'HomeController@showFeatures');
|
||||
Route::get('/secure_payment', 'HomeController@showSecurePayment');
|
||||
Route::get('/testimonials', 'HomeController@showTestimonials');
|
||||
Route::get('log_error', 'HomeController@logError');
|
||||
Route::get('invoice_now', 'HomeController@invoiceNow');
|
||||
Route::post('get_started', 'AccountController@getStarted');
|
||||
|
||||
Route::get('log_error', 'HomeController@logError');
|
||||
Route::get('invoice_now', 'HomeController@invoiceNow');
|
||||
Route::post('get_started', 'AccountController@getStarted');
|
||||
Route::get('view/{invitation_key}', 'InvoiceController@view');
|
||||
Route::get('payment/{invitation_key}', 'PaymentController@show_payment');
|
||||
Route::post('payment/{invitation_key}', 'PaymentController@do_payment');
|
||||
Route::get('complete', 'PaymentController@offsite_payment');
|
||||
|
||||
Route::get('view/{invitation_key}', 'InvoiceController@view');
|
||||
Route::get('payment/{invitation_key}', 'PaymentController@show_payment');
|
||||
Route::post('payment/{invitation_key}', 'PaymentController@do_payment');
|
||||
Route::get('complete', 'PaymentController@offsite_payment');
|
||||
|
||||
Route::post('signup/validate', 'AccountController@checkEmail');
|
||||
Route::post('signup/submit', 'AccountController@submitSignup');
|
||||
Route::post('signup/validate', 'AccountController@checkEmail');
|
||||
Route::post('signup/submit', 'AccountController@submitSignup');
|
||||
} else {
|
||||
Route::get('/', function() {
|
||||
return Redirect::to('dashboard');
|
||||
});
|
||||
}
|
||||
|
||||
// Confide routes
|
||||
Route::get('login', 'UserController@login');
|
||||
@ -60,7 +65,7 @@ Route::get('logout', 'UserController@logout');
|
||||
|
||||
Route::group(array('before' => 'auth'), function()
|
||||
{
|
||||
Route::get('dashboard', 'DashboardController@index');
|
||||
Route::get('dashboard', 'DashboardController@index');
|
||||
Route::get('view_archive/{entity_type}/{visible}', 'AccountController@setTrashVisible');
|
||||
Route::get('force_inline_pdf', 'UserController@forcePDFJS');
|
||||
|
||||
|
@ -1492,7 +1492,7 @@
|
||||
model.addTaxRate();
|
||||
@foreach ($taxRates as $taxRate)
|
||||
model.addTaxRate({{ $taxRate }});
|
||||
@endforeach
|
||||
@endforeach
|
||||
@if ($invoice)
|
||||
var invoice = {{ $invoice }};
|
||||
ko.mapping.fromJS(invoice, model.invoice().mapping, model.invoice);
|
||||
@ -1508,6 +1508,11 @@
|
||||
model.invoice().addItem();
|
||||
//model.addTaxRate();
|
||||
@endif
|
||||
// Add the first tax rate for new invoices
|
||||
//if(model.invoice_taxes() && model.tax_rates().length > 0) {
|
||||
// var tax = model.tax_rates()[0];
|
||||
// model.invoice().tax(tax);
|
||||
//}
|
||||
@endif
|
||||
|
||||
model.invoice().tax(model.getTaxRate(model.invoice().tax_name(), model.invoice().tax_rate()));
|
||||
|
@ -18,5 +18,9 @@
|
||||
"accounting": "~0.*",
|
||||
"pdfjs": "*",
|
||||
"spectrum": "~1.3.4"
|
||||
},
|
||||
"resolutions": {
|
||||
"datatables": "~1.*",
|
||||
"jquery": "~1.11"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
262
public/built.js
262
public/built.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user