mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
CRUD
This commit is contained in:
parent
d8ff4a3c05
commit
954c04c917
@ -67,6 +67,7 @@ class MakeModule extends Command
|
||||
Artisan::call('ninja:make-class', ['name' => $name, 'module' => $name, 'class' => 'request', 'prefix' => 'update']);
|
||||
Artisan::call('ninja:make-class', ['name' => $name, 'module' => $name, 'class' => 'api-controller']);
|
||||
Artisan::call('ninja:make-class', ['name' => $name, 'module' => $name, 'class' => 'transformer', '--fields' => $fields]);
|
||||
Artisan::call('ninja:make-class', ['name' => $name, 'module' => $name, 'class' => 'lang', '--filename' => 'texts']);
|
||||
|
||||
if ($migrate) {
|
||||
Artisan::call('module:migrate', ['module' => $name]);
|
||||
|
10
app/Console/Commands/stubs/lang.stub
Normal file
10
app/Console/Commands/stubs/lang.stub
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$LANG = array(
|
||||
|
||||
'$LOWER_NAME$' => '$STUDLY_NAME$',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
||||
?>
|
@ -908,6 +908,16 @@ if (!defined('CONTACT_EMAIL')) {
|
||||
return $string != $english ? $string : '';
|
||||
}
|
||||
}
|
||||
|
||||
// include modules in translations
|
||||
function mtrans($entityType, $text)
|
||||
{
|
||||
if ( ! Utils::isNinjaProd() && $module = Module::find($entityType)) {
|
||||
return trans("{$module->getLowerName()}::texts.{$text}");
|
||||
} else {
|
||||
return trans("texts.{$text}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,7 +105,7 @@ return [
|
||||
'filter' => 'Http/Middleware',
|
||||
'request' => 'Http/Requests',
|
||||
'provider' => 'Providers',
|
||||
'lang' => 'Resources/lang',
|
||||
'lang' => 'Resources/lang/en',
|
||||
'views' => 'Resources/views',
|
||||
'test' => 'Tests',
|
||||
'jobs' => 'Jobs',
|
||||
|
@ -20,7 +20,7 @@
|
||||
style="font-size:16px; padding-top:6px; padding-bottom:6px"
|
||||
class="{{ Request::is("{$option}*") ? 'active' : '' }}">
|
||||
<i class="fa fa-{{ empty($icon) ? \App\Models\EntityModel::getIcon($option) : $icon }}" style="width:46px; padding-right:10px"></i>
|
||||
{{ ($option == 'recurring_invoices') ? trans('texts.recurring') : trans("texts.{$option}") }}
|
||||
{{ ($option == 'recurring_invoices') ? trans('texts.recurring') : mtrans($option, $option) }}
|
||||
{!! Utils::isTrial() && in_array($option, ['quotes', 'tasks', 'expenses', 'vendors']) ? ' <sup>' . trans('texts.pro') . '</sup>' : '' !!}
|
||||
</a>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user