1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-17 16:42:48 +01:00

Link to relevant page in docs

This commit is contained in:
Hillel Coren 2016-09-21 16:18:26 +03:00
parent 77ca2e7edf
commit 7ae01f8f42
8 changed files with 59 additions and 14 deletions

View File

@ -15,6 +15,7 @@ use DateTime;
use stdClass;
use Carbon;
use WePay;
use App\Models\Account;
class Utils
{
@ -1029,4 +1030,58 @@ class Utils
return trans('texts.'.strtolower($day));
});
}
public static function getDocsUrl($path)
{
$page = '';
$parts = explode('/', $path);
$first = count($parts) ? $parts[0] : false;
$second = count($parts) > 1 ? $parts[1] : false;
$entityTypes = [
'clients',
'invoices',
'payments',
'recurring_invoices',
'credits',
'quotes',
'tasks',
'expenses',
'vendors',
];
if ($path == 'dashboard') {
$page = '/introduction.html#dashboard';
} elseif (in_array($path, $entityTypes)) {
$page = "/{$path}.html#list-" . str_replace('_', '-', $path);
} elseif (in_array($first, $entityTypes)) {
$action = ($first == 'payments' || $first == 'credits') ? 'enter' : 'create';
$page = "/{$first}.html#{$action}-" . substr(str_replace('_', '-', $first), 0, -1);
} elseif ($first == 'expense_categories') {
$page = '/expenses.html#expense-categories';
} elseif ($first == 'settings') {
if ($second == 'bank_accounts') {
$page = ''; // TODO write docs
} elseif (in_array($second, Account::$basicSettings)) {
if ($second == 'products') {
$second = 'product_library';
} elseif ($second == 'notifications') {
$second = 'email_notifications';
}
$page = '/settings.html#' . str_replace('_', '-', $second);
} elseif (in_array($second, Account::$advancedSettings)) {
$page = "/{$second}.html";
} elseif ($second == 'customize_design') {
$page = '/invoice_design.html#customize';
}
} elseif ($first == 'tax_rates') {
$page = '/settings.html#tax-rates';
} elseif ($first == 'products') {
$page = '/settings.html#product-library';
} elseif ($first == 'users') {
$page = '/user_management.html#create-user';
}
return url(NINJA_DOCS_URL . $page);
}
}

View File

@ -47,9 +47,6 @@ Want to view archived or deleted payments? Check the box marked Show archived/de
- **Deleted payments** are displayed with a red Deleted button. To restore deleted payments, hover on the red Deleted button. A gray Select button will appear. Click on the Select arrow, and select Restore payment in the drop-down list.
- **Archived payments** are displayed with an orange Archived button. To restore the archived payment, hover on the orange Archived button. A gray Select button will appear. Click on the Select arrow, and choose Restore payment from the drop-down list. To delete an archived payment, select Delete payment from the drop-down list of the Select button.
Enter Payment
^^^^^^^^^^^^^
You can enter a new payment directly from the Payments list page by clicking on the blue Enter Payment + button located at the top right side of the page. The Payments / Create page will open.
Filter

View File

@ -26,9 +26,6 @@ Here is a description of the columns in the recurring invoices list, as displaye
- **Archive Recurring**: Invoice Click here to archive the recurring invoice. It will be archived and removed from the Recurring Invoices list page.
- **Delete Recurring**: Invoice Click here to delete the recurring invoice. It will be deleted and removed from the Recurring Invoices list page.
New Recurring Invoice
^^^^^^^^^^^^^^^^^^^^^
You can create a new recurring invoice directly from the Recurring Invoices list page by clicking on the blue New Recurring Invoice + button located at the top right side of the page. The Recurring Invoices / Create page will open.
Filter

View File

@ -180,7 +180,7 @@ To create a tax rate, complete the two fields:
Click the green Save button to create the tax rate. It will now appear on the tax rates list.
Product Library
""""""""""""""""
"""""""""""""""
Add products to your product library to make your invoice creation process faster.

View File

@ -42,9 +42,6 @@ To view the actions, hover your mouse over the Action area of the relevant task
.. TIP:: To sort the tasks list according to any of the columns, click on the orange column tab of your choice. A small arrow will appear. If the arrow is pointing up, data is sorted from lowest to highest value. If the arrow is pointing down, data is sorted from highest to lowest value. Click to change the arrow direction.
Create Task
^^^^^^^^^^^
You can create a new task directly from the Tasks list page by clicking on the blue New Task + button located at the top right side of the page. The Tasks / Create page will open.
Filter

View File

@ -37,9 +37,6 @@ Here are the available actions in the drop-down list of the Action button, and t
.. TIP:: Each vendor you create has its own summary page, where you can view and manage the vendor details. To view a vendor's summary page, click on the vendor name in the Vendors list. You'll be automatically redirected to the vendor's summary page.
New Vendor
^^^^^^^^^^
You can add a new vendor directly from the Vendors list page by clicking on the blue New Vendor + button located at the top right side of the page. The Vendors / Create page will open.
Sorting & Filtering Vendors

View File

@ -2135,6 +2135,8 @@ $LANG = array(
'raw_html' => 'Raw HTML',
'update' => 'Update',
'invoice_fields_help' => 'Drag and drop fields to change their order and location',
'new_category' => 'New Category',
);

View File

@ -522,7 +522,7 @@
<li class="{{ Request::is("{$option}*") ? 'active' : '' }}">
@if ($option == 'settings')
<a type="button" class="btn btn-default btn-sm pull-right"
href="{{ url(NINJA_DOCS_URL) }}" target="_blank">
href="{{ Utils::getDocsUrl(request()->path()) }}" target="_blank">
<i class="fa fa-question-circle" style="width:20px" title="{{ trans('texts.help') }}"></i>
</a>
@elseif ($option != 'dashboard')