database relocated.

Fixed permissions in html partials
This commit is contained in:
Tanshu
2012-10-26 23:24:59 +05:30
parent 0ad7dbbcb5
commit b1dd396556
9 changed files with 28 additions and 43 deletions

Binary file not shown.

Binary file not shown.

View File

@ -117,18 +117,14 @@
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code != '(Auto)'"
ng-disabled="!perms['Issue Create']">Save
<button class="btn btn-primary" ng-click="save()"
ng-disabled="!perms['Issue']">{{voucher.Code | save_button}}
</button>
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Issue Update']">
Update
</button>
<button class="btn btn-danger" ng-click="resetVoucher(voucher.VoucherID)" ng-hide="voucher.Code == '(Auto)'">
= <button class="btn btn-danger" ng-click="resetVoucher(voucher.VoucherID)" ng-hide="voucher.Code == '(Auto)'">
New Entry
</button>
<button class="btn btn-danger" ng-click="delete()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Issue Delete']">
ng-disabled="!perms['Issue']">
Delete
</button>
</div>

View File

@ -68,18 +68,14 @@
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code != '(Auto)'"
ng-disabled="!perms['Journal Create']">Save
</button>
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Journal Update'] || (voucher.Posted && !perms['EditPosted'])">
Update
<button class="btn btn-primary" ng-click="save()"
ng-disabled="!perms['Journal']">{{voucher.Code | save_button}}
</button>
<button class="btn btn-inverse" ng-click="post()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="voucher.Posted || !perms['PostTransactions']">{{voucher.Posted | posted}}
ng-disabled="voucher.Posted || !perms['Post Vouchers']">{{voucher.Posted | posted}}
</button>
<button class="btn btn-danger" ng-click="delete()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Journal Delete'] || (voucher.Posted && !perms['EditPosted'])">
ng-disabled="!perms['Journal'] || (voucher.Posted && !perms['Edit Posted Vouchers'])">
Delete
</button>
</div>

View File

@ -77,18 +77,14 @@
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code != '(Auto)'"
ng-disabled="!perms['Payment Create']">Save
</button>
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Payment Update'] || (voucher.Posted && !perms['EditPosted'])">
Update
<button class="btn btn-primary" ng-click="save()"
ng-disabled="!perms['Payment']">{{voucher.Code | save_button}}
</button>
<button class="btn btn-inverse" ng-click="post()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="voucher.Posted || !perms['PostTransactions']">{{voucher.Posted | posted}}
ng-disabled="voucher.Posted || !perms['Post Vouchers']">{{voucher.Posted | posted}}
</button>
<button class="btn btn-danger" ng-click="delete()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Payment Delete'] || (voucher.Posted && !perms['EditPosted'])">
ng-disabled="!perms['Payment'] || (voucher.Posted && !perms['Edit Posted Vouchers'])">
Delete
</button>
</div>

View File

@ -92,19 +92,14 @@
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code != '(Auto)'"
ng-disabled="!perms['Purchase Create']">Save
</button>
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Purchase Update'] || (voucher.Posted && !perms['EditPosted'])">
Update
<button class="btn btn-primary" ng-click="save()"
ng-disabled="!perms['Purchase']">{{voucher.Code | save_button}}
</button>
<button class="btn btn-inverse" ng-click="post()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="voucher.Posted || !perms['PostTransactions']">{{voucher.Posted |
posted}}
ng-disabled="voucher.Posted || !perms['Post Vouchers']">{{voucher.Posted | posted}}
</button>
<button class="btn btn-danger" ng-click="delete()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Purchase Delete'] || (voucher.Posted && !perms['EditPosted'])">
ng-disabled="!perms['Purchase'] || (voucher.Posted && !perms['Edit Posted Vouchers'])">
Delete
</button>
</div>

View File

@ -77,18 +77,14 @@
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code != '(Auto)'"
ng-disabled="!perms['Receipt Create']">Save
</button>
<button class="btn btn-primary" ng-click="save()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Receipt Update'] || (voucher.Posted && !perms['EditPosted'])">
Update
<button class="btn btn-primary" ng-click="save()"
ng-disabled="!perms['Receipt']">{{voucher.Code | save_button}}
</button>
<button class="btn btn-inverse" ng-click="post()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="voucher.Posted || !perms['PostTransactions']">{{voucher.Posted | posted}}
ng-disabled="voucher.Posted || !perms['Post Vouchers']">{{voucher.Posted | posted}}
</button>
<button class="btn btn-danger" ng-click="delete()" ng-hide="voucher.Code == '(Auto)'"
ng-disabled="!perms['Receipt Delete'] || (voucher.Posted && !perms['EditPosted'])">
ng-disabled="!perms['Receipt'] || (voucher.Posted && !perms['Edit Posted Vouchers'])">
Delete
</button>
</div>

View File

@ -14,7 +14,13 @@ overlord_filter.filter('debit', function () {
overlord_filter.filter('posted', function () {
return function (input) {
return input == true ? 'Posted' : 'Post';
return input === true ? 'Posted' : 'Post';
};
});
overlord_filter.filter('save_button', function () {
return function (input) {
return input === '(Auto)' ? 'Save' : 'Update';
};
});

View File

@ -8,7 +8,7 @@ pyramid.debug_routematch = false
pyramid.default_locale_name = en
# pyramid.includes =
# pyramid_debugtoolbar
sqlalchemy.url = sqlite:///%(here)s/brewman/database/brewman.db
sqlalchemy.url = sqlite:///%(here)s/database/brewman.db
[server:main]
use = egg:waitress#main