mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Partialize forms (#2884)
* Consolidate edit form elements into reusable partials. This is a large code change that doesn't do much immediately. It refactors all of the various edit.blade.php files to reference standardized partials, so that they all reference the same base html layout. This has the side effect of moving everything to the new fancy "required" indicators, and making things look consistent. In addition, I've gone ahead and renamed a few database fields. We had Assetmodel::modelno and Consumable::model_no, I've renamed both to model_number. We had items using ::note and ::notes, I've standardized on ::notes. Component used total_qty where consumables and accessories used qty, so I've moved everything to qty (And fixed a few bugs in the helper file in the process. TODO includes looking at how/where to place the modal javascripts to allow for on the fly creation from all places, rather than just the asset page. Rename assetmodel::modelno to model_number for clarity and consistency Rename consumable::model_no to model_number for clarity and consistency Rename assetmodel::note to notes for clarity and consistency Port asset and assetmodel to new partials layout. Adapt all code to the renamed model_number and notes database changes. Fix some stying. * Share a settings variable with all views. * Allow editing the per_page setting. We showed the value, but we never showed it on the edit page.. * use snipeSettings in all views instead of the long ugly path. * War on partials. Centralize all bootstrap table javascript * Use model_number instead of modelno in importer * Codacy fix. * More unification/deduplication. Create an edit form template layout that we use as the base for all edit forms. This gives the same interface for editing everything and makes the edit.blade.* files much easier to read. * Use a ViewComposer instead of sharing the variable directly. Fixes artisan optimize trying to hit the db--which ruins new installs * Fix DB seeder. * Base sql dump and csv's to import data from for tests. * Start some functional tests for creating items. * Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things * Improvements to functional tests. Use the built in DB seeding mechanism instead of doing it ourselves. Break the tests into multiple units, rather than testing everything in each function. * Some improvements to acceptance tests. Make sure we're only looking at the "trs" within the bootstrap table. Creation of assets is now tested at the functional level (and is faster) so ignore it here. I'm testing acceptance tests with the IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder imported. * A few things to make acceptance tests work. Add a name to the companies table, and make the locations table have the correct name * Use a .env.tests file for testing functional and unit to allow a separate database. * Add functional tests for compoents, groups, and licenses. * Now that the config is in the functional.yml, this just confuses things. * Start some functional tests for creating items. * Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things * Improvements to functional tests. Use the built in DB seeding mechanism instead of doing it ourselves. Break the tests into multiple units, rather than testing everything in each function. * Some improvements to acceptance tests. Make sure we're only looking at the "trs" within the bootstrap table. Creation of assets is now tested at the functional level (and is faster) so ignore it here. I'm testing acceptance tests with the IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder imported. * update db dump * Update tests to new reality * env for the test setup * only load the database at beginning of tests, not between each Functional test. * Fix a miss from renaming note to notes. * Set Termination date when creating an asset. It was only set on edit. * Rename serial_number to serial in components for consistency. * Update validation rules to match limits in database. Currently we just accepted the values and they were truncated when adding to DB. * Much more detailed functional testing of creating items. This checks to make sure all values on form have been successfully persisted to database.
This commit is contained in:
parent
84e06f4642
commit
d722ed3823
9
.env.tests
Normal file
9
.env.tests
Normal file
|
@ -0,0 +1,9 @@
|
|||
APP_ENV=local
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://snipe-it.localapp
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=snipeittests
|
||||
DB_USERNAME=snipeit
|
||||
DB_PASSWORD=snipe
|
||||
APP_KEY=base64:tu9NRh/a6+dCXBDGvg0Gv/0TcABnFsbT4AKxrr8mwQo=
|
|
@ -100,7 +100,7 @@ class ObjectImportCommand extends Command
|
|||
$this->locations = Location::All(['name', 'id']);
|
||||
$this->categories = Category::All(['name', 'category_type', 'id']);
|
||||
$this->manufacturers = Manufacturer::All(['name', 'id']);
|
||||
$this->asset_models = AssetModel::All(['name','modelno','category_id','manufacturer_id', 'id']);
|
||||
$this->asset_models = AssetModel::All(['name','model_number','category_id','manufacturer_id', 'id']);
|
||||
$this->companies = Company::All(['name', 'id']);
|
||||
$this->status_labels = Statuslabel::All(['name', 'id']);
|
||||
$this->suppliers = Supplier::All(['name', 'id']);
|
||||
|
@ -348,7 +348,7 @@ class ObjectImportCommand extends Command
|
|||
$editingModel = false;
|
||||
foreach ($this->asset_models as $tempmodel) {
|
||||
if (strcasecmp($tempmodel->name, $asset_model_name) == 0
|
||||
&& $tempmodel->modelno == $asset_modelno) {
|
||||
&& $tempmodel->model_number == $asset_modelno) {
|
||||
$this->log('A matching model ' . $asset_model_name . ' already exists');
|
||||
if (!$this->option('update')) {
|
||||
return $tempmodel;
|
||||
|
@ -366,7 +366,7 @@ class ObjectImportCommand extends Command
|
|||
$asset_model->name = $asset_model_name;
|
||||
}
|
||||
isset($manufacturer) && $manufacturer->exists && $asset_model->manufacturer_id = $manufacturer->id;
|
||||
isset($asset_modelno) && $asset_model->modelno = $asset_modelno;
|
||||
isset($asset_modelno) && $asset_model->model_number = $asset_modelno;
|
||||
if (isset($category) && $category->exists) {
|
||||
$asset_model->category_id = $category->id;
|
||||
}
|
||||
|
|
|
@ -434,8 +434,8 @@ class Helper
|
|||
foreach ($consumables as $consumable) {
|
||||
$avail = $consumable->numRemaining();
|
||||
if ($avail < ($consumable->min_amt) + \App\Models\Setting::getSettings()->alert_threshold) {
|
||||
if ($consumable->total_qty > 0) {
|
||||
$percent = number_format((($consumable->numRemaining() / $consumable->total_qty) * 100), 0);
|
||||
if ($consumable->qty > 0) {
|
||||
$percent = number_format((($consumable->numRemaining() / $consumable->qty) * 100), 0);
|
||||
} else {
|
||||
$percent = 100;
|
||||
}
|
||||
|
@ -456,8 +456,8 @@ class Helper
|
|||
$avail = $accessory->numRemaining();
|
||||
if ($avail < ($accessory->min_amt) + \App\Models\Setting::getSettings()->alert_threshold) {
|
||||
|
||||
if ($accessory->total_qty > 0) {
|
||||
$percent = number_format((($accessory->numRemaining() / $accessory->total_qty) * 100), 0);
|
||||
if ($accessory->qty > 0) {
|
||||
$percent = number_format((($accessory->numRemaining() / $accessory->qty) * 100), 0);
|
||||
} else {
|
||||
$percent = 100;
|
||||
}
|
||||
|
@ -476,8 +476,8 @@ class Helper
|
|||
foreach ($components as $component) {
|
||||
$avail = $component->numRemaining();
|
||||
if ($avail < ($component->min_amt) + \App\Models\Setting::getSettings()->alert_threshold) {
|
||||
if ($component->total_qty > 0) {
|
||||
$percent = number_format((($component->numRemaining() / $component->total_qty) * 100), 0);
|
||||
if ($component->qty > 0) {
|
||||
$percent = number_format((($component->numRemaining() / $component->qty) * 100), 0);
|
||||
} else {
|
||||
$percent = 100;
|
||||
}
|
||||
|
|
|
@ -7,19 +7,19 @@ use App\Models\Actionlog;
|
|||
use App\Models\Company;
|
||||
use App\Models\Setting;
|
||||
use App\Models\User;
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use DB;
|
||||
use Gate;
|
||||
use Input;
|
||||
use Lang;
|
||||
use Mail;
|
||||
use Redirect;
|
||||
use Request;
|
||||
use Slack;
|
||||
use Str;
|
||||
use View;
|
||||
use Auth;
|
||||
use Request;
|
||||
use Gate;
|
||||
|
||||
/** This controller handles all actions related to Accessories for
|
||||
* the Snipe-IT Asset Management application.
|
||||
|
@ -54,7 +54,7 @@ class AccessoriesController extends Controller
|
|||
{
|
||||
// Show the page
|
||||
return View::make('accessories/edit')
|
||||
->with('accessory', new Accessory)
|
||||
->with('item', new Accessory)
|
||||
->with('category_list', Helper::categoryList('accessory'))
|
||||
->with('company_list', Helper::companyList())
|
||||
->with('location_list', Helper::locationsList())
|
||||
|
@ -119,14 +119,14 @@ class AccessoriesController extends Controller
|
|||
public function getEdit(Request $request, $accessoryId = null)
|
||||
{
|
||||
// Check if the accessory exists
|
||||
if (is_null($accessory = Accessory::find($accessoryId))) {
|
||||
if (is_null($item = Accessory::find($accessoryId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->to('admin/accessories')->with('error', trans('admin/accessories/message.does_not_exist'));
|
||||
} elseif (!Company::isCurrentUserHasAccess($accessory)) {
|
||||
} elseif (!Company::isCurrentUserHasAccess($item)) {
|
||||
return redirect()->to('admin/accessories')->with('error', trans('general.insufficient_permissions'));
|
||||
}
|
||||
|
||||
return View::make('accessories/edit', compact('accessory'))
|
||||
return View::make('accessories/edit', compact('item'))
|
||||
->with('category_list', Helper::categoryList('accessory'))
|
||||
->with('company_list', Helper::companyList())
|
||||
->with('location_list', Helper::locationsList())
|
||||
|
|
|
@ -62,7 +62,7 @@ class AssetModelsController extends Controller
|
|||
->with('category_list', $category_list)
|
||||
->with('depreciation_list', $depreciation_list)
|
||||
->with('manufacturer_list', $manufacturer_list)
|
||||
->with('model', new AssetModel);
|
||||
->with('item', new AssetModel);
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,10 +94,10 @@ class AssetModelsController extends Controller
|
|||
|
||||
// Save the model data
|
||||
$model->name = e(Input::get('name'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->model_number = e(Input::get('model_number'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->note = e(Input::get('note'));
|
||||
$model->notes = e(Input::get('notes'));
|
||||
$model->user_id = Auth::user()->id;
|
||||
$model->requestable = Input::has('requestable');
|
||||
|
||||
|
@ -146,7 +146,7 @@ class AssetModelsController extends Controller
|
|||
$model->name=e(Input::get('name'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->model_number = e(Input::get('model_number'));
|
||||
$model->user_id = Auth::user()->id;
|
||||
$model->note = e(Input::get('note'));
|
||||
$model->eol= null;
|
||||
|
@ -176,7 +176,7 @@ class AssetModelsController extends Controller
|
|||
public function getEdit($modelId = null)
|
||||
{
|
||||
// Check if the model exists
|
||||
if (is_null($model = AssetModel::find($modelId))) {
|
||||
if (is_null($item = AssetModel::find($modelId))) {
|
||||
// Redirect to the model management page
|
||||
return redirect()->to('assets/models')->with('error', trans('admin/models/message.does_not_exist'));
|
||||
}
|
||||
|
@ -184,7 +184,8 @@ class AssetModelsController extends Controller
|
|||
$depreciation_list = Helper::depreciationList();
|
||||
$manufacturer_list = Helper::manufacturerList();
|
||||
$category_list = Helper::categoryList('asset');
|
||||
$view = View::make('models/edit', compact('model'));
|
||||
|
||||
$view = View::make('models/edit', compact('item'));
|
||||
$view->with('category_list', $category_list);
|
||||
$view->with('depreciation_list', $depreciation_list);
|
||||
$view->with('manufacturer_list', $manufacturer_list);
|
||||
|
@ -221,13 +222,12 @@ class AssetModelsController extends Controller
|
|||
} else {
|
||||
$model->eol = e(Input::get('eol'));
|
||||
}
|
||||
|
||||
// Update the model data
|
||||
$model->name = e(Input::get('name'));
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->model_number = e(Input::get('model_number'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$model->category_id = e(Input::get('category_id'));
|
||||
$model->note = e(Input::get('note'));
|
||||
$model->notes = e(Input::get('notes'));
|
||||
|
||||
$model->requestable = Input::has('requestable');
|
||||
|
||||
|
@ -442,7 +442,7 @@ class AssetModelsController extends Controller
|
|||
}
|
||||
|
||||
|
||||
$allowed_columns = ['id','name','modelno'];
|
||||
$allowed_columns = ['id','name','model_number'];
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? e(Input::get('sort')) : 'created_at';
|
||||
|
||||
|
@ -465,7 +465,7 @@ class AssetModelsController extends Controller
|
|||
'manufacturer' => (string)link_to('/admin/settings/manufacturers/'.$model->manufacturer->id.'/view', $model->manufacturer->name),
|
||||
'name' => (string)link_to('/hardware/models/'.$model->id.'/view', $model->name),
|
||||
'image' => ($model->image!='') ? '<img src="'.config('app.url').'/uploads/models/'.$model->image.'" height=50 width=50>' : '',
|
||||
'modelnumber' => $model->modelno,
|
||||
'modelnumber' => $model->model_number,
|
||||
'numassets' => $model->assets->count(),
|
||||
'depreciation' => (($model->depreciation)&&($model->depreciation->id > 0)) ? $model->depreciation->name.' ('.$model->depreciation->months.')' : trans('general.no_depreciation'),
|
||||
'category' => ($model->category) ? $model->category->name : '',
|
||||
|
|
|
@ -124,7 +124,7 @@ class AssetsController extends Controller
|
|||
$view->with('statuslabel_list', $statuslabel_list);
|
||||
$view->with('assigned_to', $assigned_to);
|
||||
$view->with('location_list', $location_list);
|
||||
$view->with('asset', new Asset);
|
||||
$view->with('item', new Asset);
|
||||
$view->with('manufacturer', $manufacturer_list);
|
||||
$view->with('category', $category_list);
|
||||
$view->with('statuslabel_types', $statuslabel_types);
|
||||
|
@ -290,10 +290,10 @@ class AssetsController extends Controller
|
|||
{
|
||||
|
||||
// Check if the asset exists
|
||||
if (!$asset = Asset::find($assetId)) {
|
||||
if (!$item = Asset::find($assetId)) {
|
||||
// Redirect to the asset management page
|
||||
return redirect()->to('hardware')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||
} elseif (!Company::isCurrentUserHasAccess($asset)) {
|
||||
} elseif (!Company::isCurrentUserHasAccess($item)) {
|
||||
return redirect()->to('hardware')->with('error', trans('general.insufficient_permissions'));
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ class AssetsController extends Controller
|
|||
$assigned_to = Helper::usersList();
|
||||
$statuslabel_types =Helper::statusTypeList();
|
||||
|
||||
return View::make('hardware/edit', compact('asset'))
|
||||
return View::make('hardware/edit', compact('item'))
|
||||
->with('model_list', $model_list)
|
||||
->with('supplier_list', $supplier_list)
|
||||
->with('company_list', $company_list)
|
||||
|
@ -1038,7 +1038,7 @@ class AssetsController extends Controller
|
|||
->with('statuslabel_list', $statuslabel_list)
|
||||
->with('statuslabel_types', $statuslabel_types)
|
||||
->with('assigned_to', $assigned_to)
|
||||
->with('asset', $asset)
|
||||
->with('item', $asset)
|
||||
->with('location_list', $location_list)
|
||||
->with('manufacturer', $manufacturer_list)
|
||||
->with('category', $category_list)
|
||||
|
@ -1798,7 +1798,7 @@ class AssetsController extends Controller
|
|||
'asset_tag' => '<a title="'.e($asset->asset_tag).'" href="hardware/'.$asset->id.'/view">'.e($asset->asset_tag).'</a>',
|
||||
'serial' => e($asset->serial),
|
||||
'model' => ($asset->model) ? (string)link_to('/hardware/models/'.$asset->model->id.'/view', e($asset->model->name)) : 'No model',
|
||||
'model_number' => ($asset->model && $asset->model->modelno) ? (string)$asset->model->modelno : '',
|
||||
'model_number' => ($asset->model && $asset->model->model_number) ? (string)$asset->model->model_number : '',
|
||||
'status_label' => ($asset->assigneduser) ? 'Deployed' : ((e($asset->assetstatus)) ? e($asset->assetstatus->name) : ''),
|
||||
'assigned_to' => ($asset->assigneduser) ? (string)link_to(config('app.url').'/admin/users/'.$asset->assigned_to.'/view', e($asset->assigneduser->fullName())) : '',
|
||||
'location' => (($asset->assigneduser) && ($asset->assigneduser->userloc!='')) ? (string)link_to('admin/settings/locations/'.$asset->assigneduser->userloc->id.'/view', e($asset->assigneduser->userloc->name)) : (($asset->defaultLoc!='') ? (string)link_to('admin/settings/locations/'.$asset->defaultLoc->id.'/view', e($asset->defaultLoc->name)) : ''),
|
||||
|
|
|
@ -53,7 +53,7 @@ class CategoriesController extends Controller
|
|||
{
|
||||
// Show the page
|
||||
$category_types= Helper::categoryTypeList();
|
||||
return View::make('categories/edit')->with('category', new Category)
|
||||
return View::make('categories/edit')->with('item', new Category)
|
||||
->with('category_types', $category_types);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ class CategoriesController extends Controller
|
|||
public function getEdit($categoryId = null)
|
||||
{
|
||||
// Check if the category exists
|
||||
if (is_null($category = Category::find($categoryId))) {
|
||||
if (is_null($item = Category::find($categoryId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->to('admin/settings/categories')->with('error', trans('admin/categories/message.does_not_exist'));
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class CategoriesController extends Controller
|
|||
$category_options = array('' => 'Top Level') + DB::table('categories')->where('id', '!=', $categoryId)->lists('name', 'id');
|
||||
$category_types= Helper::categoryTypeList();
|
||||
|
||||
return View::make('categories/edit', compact('category'))
|
||||
return View::make('categories/edit', compact('item'))
|
||||
->with('category_options', $category_options)
|
||||
->with('category_types', $category_types);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ final class CompaniesController extends Controller
|
|||
*/
|
||||
public function getCreate()
|
||||
{
|
||||
return View::make('companies/edit')->with('company', new Company);
|
||||
return View::make('companies/edit')->with('item', new Company);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,11 +74,11 @@ final class CompaniesController extends Controller
|
|||
*/
|
||||
public function getEdit($companyId)
|
||||
{
|
||||
if (is_null($company = Company::find($companyId))) {
|
||||
if (is_null($item = Company::find($companyId))) {
|
||||
return redirect()->to('admin/settings/companies')
|
||||
->with('error', trans('admin/companies/message.does_not_exist'));
|
||||
} else {
|
||||
return View::make('companies/edit')->with('company', $company);
|
||||
return View::make('companies/edit')->with('item', $item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class ComponentsController extends Controller
|
|||
$location_list = Helper::locationsList();
|
||||
|
||||
return View::make('components/edit')
|
||||
->with('component', new Component)
|
||||
->with('item', new Component)
|
||||
->with('category_list', $category_list)
|
||||
->with('company_list', $company_list)
|
||||
->with('location_list', $location_list);
|
||||
|
@ -89,7 +89,7 @@ class ComponentsController extends Controller
|
|||
$component->company_id = Company::getIdForCurrentUser(Input::get('company_id'));
|
||||
$component->order_number = e(Input::get('order_number'));
|
||||
$component->min_amt = e(Input::get('min_amt'));
|
||||
$component->serial_number = e(Input::get('serial_number'));
|
||||
$component->serial = e(Input::get('serial'));
|
||||
|
||||
if (e(Input::get('purchase_date')) == '') {
|
||||
$component->purchase_date = null;
|
||||
|
@ -103,7 +103,7 @@ class ComponentsController extends Controller
|
|||
$component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$component->total_qty = e(Input::get('total_qty'));
|
||||
$component->qty = e(Input::get('qty'));
|
||||
$component->user_id = Auth::user()->id;
|
||||
|
||||
// Was the component created?
|
||||
|
@ -130,10 +130,10 @@ class ComponentsController extends Controller
|
|||
public function getEdit($componentId = null)
|
||||
{
|
||||
// Check if the component exists
|
||||
if (is_null($component = Component::find($componentId))) {
|
||||
if (is_null($item = Component::find($componentId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->to('admin/components')->with('error', trans('admin/components/message.does_not_exist'));
|
||||
} elseif (!Company::isCurrentUserHasAccess($component)) {
|
||||
} elseif (!Company::isCurrentUserHasAccess($item)) {
|
||||
return redirect()->to('admin/components')->with('error', trans('general.insufficient_permissions'));
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ class ComponentsController extends Controller
|
|||
$company_list = Helper::companyList();
|
||||
$location_list = Helper::locationsList();
|
||||
|
||||
return View::make('components/edit', compact('component'))
|
||||
return View::make('components/edit', compact('item'))
|
||||
->with('category_list', $category_list)
|
||||
->with('company_list', $company_list)
|
||||
->with('location_list', $location_list);
|
||||
|
@ -174,8 +174,8 @@ class ComponentsController extends Controller
|
|||
$component->location_id = e(Input::get('location_id'));
|
||||
$component->company_id = Company::getIdForCurrentUser(Input::get('company_id'));
|
||||
$component->order_number = e(Input::get('order_number'));
|
||||
$component->min_amt = e(Input::get('min_amt'));
|
||||
$component->serial_number = e(Input::get('serial_number'));
|
||||
$component->min_amt = e(Input::get('min_amt'));
|
||||
$component->serial = e(Input::get('serial'));
|
||||
|
||||
if (e(Input::get('purchase_date')) == '') {
|
||||
$component->purchase_date = null;
|
||||
|
@ -189,7 +189,7 @@ class ComponentsController extends Controller
|
|||
$component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$component->total_qty = e(Input::get('total_qty'));
|
||||
$component->qty = e(Input::get('qty'));
|
||||
|
||||
// Was the component created?
|
||||
if ($component->save()) {
|
||||
|
@ -424,7 +424,7 @@ class ComponentsController extends Controller
|
|||
$limit = 50;
|
||||
}
|
||||
|
||||
$allowed_columns = ['id','name','min_amt','order_number','serial_number','purchase_date','purchase_cost','companyName','category','total_qty'];
|
||||
$allowed_columns = ['id','name','min_amt','order_number','serial','purchase_date','purchase_cost','companyName','category','total_qty'];
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
||||
|
||||
|
@ -472,9 +472,9 @@ class ComponentsController extends Controller
|
|||
'checkbox' =>'<div class="text-center"><input type="checkbox" name="component['.$component->id.']" class="one_required"></div>',
|
||||
'id' => $component->id,
|
||||
'name' => (string)link_to('admin/components/'.$component->id.'/view', e($component->name)),
|
||||
'serial_number' => $component->serial_number,
|
||||
'serial_number' => $component->serial,
|
||||
'location' => ($component->location) ? e($component->location->name) : '',
|
||||
'total_qty' => e($component->total_qty),
|
||||
'qty' => e($component->qty),
|
||||
'min_amt' => e($component->min_amt),
|
||||
'category' => ($component->category) ? e($component->category->name) : 'Missing category',
|
||||
'order_number' => e($component->order_number),
|
||||
|
|
|
@ -59,7 +59,7 @@ class ConsumablesController extends Controller
|
|||
$manufacturer_list = Helper::manufacturerList();
|
||||
|
||||
return View::make('consumables/edit')
|
||||
->with('consumable', new Consumable)
|
||||
->with('item', new Consumable)
|
||||
->with('category_list', $category_list)
|
||||
->with('company_list', $company_list)
|
||||
->with('location_list', $location_list)
|
||||
|
@ -85,7 +85,7 @@ class ConsumablesController extends Controller
|
|||
$consumable->order_number = e(Input::get('order_number'));
|
||||
$consumable->min_amt = e(Input::get('min_amt'));
|
||||
$consumable->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$consumable->model_no = e(Input::get('model_no'));
|
||||
$consumable->model_number = e(Input::get('model_number'));
|
||||
$consumable->item_no = e(Input::get('item_no'));
|
||||
|
||||
if (e(Input::get('purchase_date')) == '') {
|
||||
|
@ -127,10 +127,10 @@ class ConsumablesController extends Controller
|
|||
public function getEdit($consumableId = null)
|
||||
{
|
||||
// Check if the consumable exists
|
||||
if (is_null($consumable = Consumable::find($consumableId))) {
|
||||
if (is_null($item = Consumable::find($consumableId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->to('admin/consumables')->with('error', trans('admin/consumables/message.does_not_exist'));
|
||||
} elseif (!Company::isCurrentUserHasAccess($consumable)) {
|
||||
} elseif (!Company::isCurrentUserHasAccess($item)) {
|
||||
return redirect()->to('admin/consumables')->with('error', trans('general.insufficient_permissions'));
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ class ConsumablesController extends Controller
|
|||
$location_list = Helper::locationsList();
|
||||
$manufacturer_list = Helper::manufacturerList();
|
||||
|
||||
return View::make('consumables/edit', compact('consumable'))
|
||||
return View::make('consumables/edit', compact('item'))
|
||||
->with('category_list', $category_list)
|
||||
->with('company_list', $company_list)
|
||||
->with('location_list', $location_list)
|
||||
|
@ -171,7 +171,7 @@ class ConsumablesController extends Controller
|
|||
$consumable->order_number = e(Input::get('order_number'));
|
||||
$consumable->min_amt = e(Input::get('min_amt'));
|
||||
$consumable->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
$consumable->model_no = e(Input::get('model_no'));
|
||||
$consumable->model_number = e(Input::get('model_number'));
|
||||
$consumable->item_no = e(Input::get('item_no'));
|
||||
|
||||
if (e(Input::get('purchase_date')) == '') {
|
||||
|
@ -412,7 +412,7 @@ class ConsumablesController extends Controller
|
|||
$limit = 50;
|
||||
}
|
||||
|
||||
$allowed_columns = ['id','name','order_number','min_amt','purchase_date','purchase_cost','companyName','category','model_no', 'item_no', 'manufacturer'];
|
||||
$allowed_columns = ['id','name','order_number','min_amt','purchase_date','purchase_cost','companyName','category','model_number', 'item_no', 'manufacturer'];
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
||||
|
||||
|
@ -466,7 +466,7 @@ class ConsumablesController extends Controller
|
|||
'min_amt' => e($consumable->min_amt),
|
||||
'qty' => e($consumable->qty),
|
||||
'manufacturer' => ($consumable->manufacturer) ? (string) link_to('/admin/settings/manufacturers/'.$consumable->manufacturer_id.'/view', $consumable->manufacturer->name): '',
|
||||
'model_no' => e($consumable->model_no),
|
||||
'model_number' => e($consumable->model_number),
|
||||
'item_no' => e($consumable->item_no),
|
||||
'category' => ($consumable->category) ? (string) link_to('/admin/settings/categories/'.$consumable->category_id.'/view', $consumable->category->name) : 'Missing category',
|
||||
'order_number' => e($consumable->order_number),
|
||||
|
|
|
@ -46,7 +46,7 @@ class DepreciationsController extends Controller
|
|||
public function getCreate()
|
||||
{
|
||||
// Show the page
|
||||
return View::make('depreciations/edit')->with('depreciation', new Depreciation);
|
||||
return View::make('depreciations/edit')->with('item', new Depreciation);
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,12 +94,12 @@ class DepreciationsController extends Controller
|
|||
public function getEdit($depreciationId = null)
|
||||
{
|
||||
// Check if the depreciation exists
|
||||
if (is_null($depreciation = Depreciation::find($depreciationId))) {
|
||||
if (is_null($item = Depreciation::find($depreciationId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->to('admin/settings/depreciations')->with('error', trans('admin/depreciations/message.does_not_exist'));
|
||||
}
|
||||
|
||||
return View::make('depreciations/edit', compact('depreciation'));
|
||||
return View::make('depreciations/edit', compact('item'));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class LicensesController extends Controller
|
|||
->with('maintained_list', $maintained_list)
|
||||
->with('company_list', Helper::companyList())
|
||||
->with('manufacturer_list', Helper::manufacturerList())
|
||||
->with('license', new License);
|
||||
->with('item', new License);
|
||||
|
||||
}
|
||||
|
||||
|
@ -139,6 +139,7 @@ class LicensesController extends Controller
|
|||
$license->depreciation_id = e(Input::get('depreciation_id'));
|
||||
$license->company_id = Company::getIdForCurrentUser(Input::get('company_id'));
|
||||
$license->expiration_date = e(Input::get('expiration_date'));
|
||||
$license->termination_date = e(Input::get('termination_date'));
|
||||
$license->user_id = Auth::user()->id;
|
||||
|
||||
if (($license->purchase_date == "") || ($license->purchase_date == "0000-00-00")) {
|
||||
|
@ -190,26 +191,26 @@ class LicensesController extends Controller
|
|||
public function getEdit($licenseId = null)
|
||||
{
|
||||
// Check if the license exists
|
||||
if (is_null($license = License::find($licenseId))) {
|
||||
if (is_null($item = License::find($licenseId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->to('admin/licenses')->with('error', trans('admin/licenses/message.does_not_exist'));
|
||||
} elseif (!Company::isCurrentUserHasAccess($license)) {
|
||||
} elseif (!Company::isCurrentUserHasAccess($item)) {
|
||||
return redirect()->to('admin/licenses')->with('error', trans('general.insufficient_permissions'));
|
||||
}
|
||||
|
||||
if ($license->purchase_date == "0000-00-00") {
|
||||
$license->purchase_date = null;
|
||||
if ($item->purchase_date == "0000-00-00") {
|
||||
$item->purchase_date = null;
|
||||
}
|
||||
|
||||
if ($license->purchase_cost == "0.00") {
|
||||
$license->purchase_cost = null;
|
||||
if ($item->purchase_cost == "0.00") {
|
||||
$item->purchase_cost = null;
|
||||
}
|
||||
|
||||
// Show the page
|
||||
$license_options = array('' => 'Top Level') + DB::table('assets')->where('id', '!=', $licenseId)->pluck('name', 'id');
|
||||
$maintained_list = array('' => 'Maintained', '1' => 'Yes', '0' => 'No');
|
||||
|
||||
return View::make('licenses/edit', compact('license'))
|
||||
return View::make('licenses/edit', compact('item'))
|
||||
->with('license_options', $license_options)
|
||||
->with('depreciation_list', Helper::depreciationList())
|
||||
->with('supplier_list', Helper::suppliersList())
|
||||
|
@ -786,7 +787,7 @@ class LicensesController extends Controller
|
|||
->with('license_options', $license_options)
|
||||
->with('depreciation_list', $depreciation_list)
|
||||
->with('supplier_list', $supplier_list)
|
||||
->with('license', $license)
|
||||
->with('item', $license)
|
||||
->with('maintained_list', $maintained_list)
|
||||
->with('company_list', $company_list)
|
||||
->with('manufacturer_list', Helper::manufacturerList());
|
||||
|
|
|
@ -61,7 +61,7 @@ class LocationsController extends Controller
|
|||
|
||||
return View::make('locations/edit')
|
||||
->with('location_options', $location_options)
|
||||
->with('location', new Location);
|
||||
->with('item', new Location);
|
||||
}
|
||||
|
||||
|
||||
|
@ -159,7 +159,7 @@ class LocationsController extends Controller
|
|||
public function getEdit($locationId = null)
|
||||
{
|
||||
// Check if the location exists
|
||||
if (is_null($location = Location::find($locationId))) {
|
||||
if (is_null($item = Location::find($locationId))) {
|
||||
return redirect()->to('admin/settings/locations')->with('error', trans('admin/locations/message.does_not_exist'));
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ class LocationsController extends Controller
|
|||
$location_options = Location::flattenLocationsArray($location_options_array);
|
||||
$location_options = array('' => 'Top Level') + $location_options;
|
||||
|
||||
return View::make('locations/edit', compact('location'))->with('location_options', $location_options);
|
||||
return View::make('locations/edit', compact('item'))->with('location_options', $location_options);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class ManufacturersController extends Controller
|
|||
*/
|
||||
public function getCreate()
|
||||
{
|
||||
return View::make('manufacturers/edit')->with('manufacturer', new Manufacturer);
|
||||
return View::make('manufacturers/edit')->with('item', new Manufacturer);
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,13 +84,13 @@ class ManufacturersController extends Controller
|
|||
public function getEdit($manufacturerId = null)
|
||||
{
|
||||
// Check if the manufacturer exists
|
||||
if (is_null($manufacturer = Manufacturer::find($manufacturerId))) {
|
||||
if (is_null($item = Manufacturer::find($manufacturerId))) {
|
||||
// Redirect to the manufacturer page
|
||||
return redirect()->to('admin/settings/manufacturers')->with('error', trans('admin/manufacturers/message.does_not_exist'));
|
||||
}
|
||||
|
||||
// Show the page
|
||||
return View::make('manufacturers/edit', compact('manufacturer'));
|
||||
return View::make('manufacturers/edit', compact('item'));
|
||||
}
|
||||
|
||||
|
||||
|
@ -521,7 +521,7 @@ class ManufacturersController extends Controller
|
|||
'min_amt' => e($consumable->min_amt),
|
||||
'qty' => e($consumable->qty),
|
||||
'manufacturer' => ($consumable->manufacturer) ? (string) link_to('/admin/settings/manufacturers/'.$consumable->manufacturer_id.'/view', $consumable->manufacturer->name): '',
|
||||
'model_no' => e($consumable->model_no),
|
||||
'model_number' => e($consumable->model_number),
|
||||
'item_no' => e($consumable->item_no),
|
||||
'category' => ($consumable->category) ? (string) link_to('/admin/settings/categories/'.$consumable->category_id.'/view', $consumable->category->name) : 'Missing category',
|
||||
'order_number' => e($consumable->order_number),
|
||||
|
|
|
@ -152,7 +152,7 @@ class ReportsController extends Controller
|
|||
$asset->asset_tag,
|
||||
($asset->model->manufacturer) ? $asset->model->manufacturer->name : '',
|
||||
($asset->model) ? $asset->model->name : '',
|
||||
($asset->model->modelno) ? $asset->model->modelno : '',
|
||||
($asset->model->model_number) ? $asset->model->model_number : '',
|
||||
($asset->name) ? $asset->name : '',
|
||||
($asset->serial) ? $asset->serial : '',
|
||||
($asset->assetstatus) ? e($asset->assetstatus->name) : '',
|
||||
|
@ -610,7 +610,7 @@ class ReportsController extends Controller
|
|||
}
|
||||
if (e(Input::get('model')) == '1') {
|
||||
$row[] = '"' . e($asset->model->name) . '"';
|
||||
$row[] = '"' . e($asset->model->modelno) . '"';
|
||||
$row[] = '"' . e($asset->model->model_number) . '"';
|
||||
}
|
||||
if (e(Input::get('category')) == '1') {
|
||||
$row[] = '"' .e($asset->model->category->name) . '"';
|
||||
|
|
|
@ -87,11 +87,11 @@ class StatuslabelsController extends Controller
|
|||
public function getCreate()
|
||||
{
|
||||
// Show the page
|
||||
$statuslabel = new Statuslabel;
|
||||
$use_statuslabel_type = $statuslabel->getStatuslabelType();
|
||||
$item = new Statuslabel;
|
||||
$use_statuslabel_type = $item->getStatuslabelType();
|
||||
$statuslabel_types = Helper::statusTypeList();
|
||||
|
||||
return View::make('statuslabels/edit', compact('statuslabel_types', 'statuslabel'))->with('use_statuslabel_type', $use_statuslabel_type);
|
||||
return View::make('statuslabels/edit', compact('statuslabel_types', 'item'))->with('use_statuslabel_type', $use_statuslabel_type);
|
||||
}
|
||||
|
||||
|
||||
|
@ -169,16 +169,16 @@ class StatuslabelsController extends Controller
|
|||
public function getEdit($statuslabelId = null)
|
||||
{
|
||||
// Check if the Statuslabel exists
|
||||
if (is_null($statuslabel = Statuslabel::find($statuslabelId))) {
|
||||
if (is_null($item = Statuslabel::find($statuslabelId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->to('admin/settings/statuslabels')->with('error', trans('admin/statuslabels/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$use_statuslabel_type = $statuslabel->getStatuslabelType();
|
||||
$use_statuslabel_type = $item->getStatuslabelType();
|
||||
|
||||
$statuslabel_types = array('' => trans('admin/hardware/form.select_statustype')) + array('undeployable' => trans('admin/hardware/general.undeployable')) + array('pending' => trans('admin/hardware/general.pending')) + array('archived' => trans('admin/hardware/general.archived')) + array('deployable' => trans('admin/hardware/general.deployable'));
|
||||
|
||||
return View::make('statuslabels/edit', compact('statuslabel', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type);
|
||||
return View::make('statuslabels/edit', compact('item', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class SuppliersController extends Controller
|
|||
*/
|
||||
public function getCreate()
|
||||
{
|
||||
return View::make('suppliers/edit')->with('supplier', new Supplier);
|
||||
return View::make('suppliers/edit')->with('item', new Supplier);
|
||||
}
|
||||
|
||||
|
||||
|
@ -125,13 +125,13 @@ class SuppliersController extends Controller
|
|||
public function getEdit($supplierId = null)
|
||||
{
|
||||
// Check if the supplier exists
|
||||
if (is_null($supplier = Supplier::find($supplierId))) {
|
||||
if (is_null($item = Supplier::find($supplierId))) {
|
||||
// Redirect to the supplier page
|
||||
return redirect()->to('admin/settings/suppliers')->with('error', trans('admin/suppliers/message.does_not_exist'));
|
||||
}
|
||||
|
||||
// Show the page
|
||||
return View::make('suppliers/edit', compact('supplier'));
|
||||
return View::make('suppliers/edit', compact('item'));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
namespace App\Models;
|
||||
|
||||
use App\Models\Loggable;
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
@ -11,7 +12,7 @@ use Watson\Validating\ValidatingTrait;
|
|||
*
|
||||
* @version v1.0
|
||||
*/
|
||||
class Accessory extends Model
|
||||
class Accessory extends SnipeModel
|
||||
{
|
||||
use CompanyableTrait;
|
||||
use Loggable;
|
||||
|
|
|
@ -400,6 +400,11 @@ class Asset extends Depreciable
|
|||
}
|
||||
}
|
||||
|
||||
public function getDisplayNameAttribute()
|
||||
{
|
||||
return $this->showAssetName();
|
||||
}
|
||||
|
||||
public function warrantee_expires()
|
||||
{
|
||||
$date = date_create($this->purchase_date);
|
||||
|
@ -788,7 +793,7 @@ public function checkin_email()
|
|||
$query->where(function ($query) use ($search) {
|
||||
$query->where('categories.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('models.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('models.modelno', 'LIKE', '%'.$search.'%');
|
||||
->orWhere('models.model_number', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
});
|
||||
})->orWhereHas('model', function ($query) use ($search) {
|
||||
|
@ -856,7 +861,7 @@ public function checkin_email()
|
|||
*/
|
||||
public function scopeOrderModelNumber($query, $order)
|
||||
{
|
||||
return $query->join('models', 'assets.model_id', '=', 'models.id')->orderBy('models.modelno', $order);
|
||||
return $query->join('models', 'assets.model_id', '=', 'models.id')->orderBy('models.model_number', $order);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
namespace App\Models;
|
||||
|
||||
use App\Models\Requestable;
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
@ -12,7 +13,7 @@ use Watson\Validating\ValidatingTrait;
|
|||
*
|
||||
* @version v1.0
|
||||
*/
|
||||
class AssetModel extends Model
|
||||
class AssetModel extends SnipeModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
use Requestable;
|
||||
|
@ -22,7 +23,7 @@ class AssetModel extends Model
|
|||
// Declare the rules for the model validation
|
||||
protected $rules = array(
|
||||
'name' => 'required|min:1|max:255',
|
||||
'modelno' => 'min:1|max:255',
|
||||
'model_number' => 'min:1|max:255',
|
||||
'category_id' => 'required|integer',
|
||||
'manufacturer_id' => 'required|integer',
|
||||
'eol' => 'integer:min:0|max:240',
|
||||
|
@ -92,8 +93,8 @@ class AssetModel extends Model
|
|||
public function displayModelName()
|
||||
{
|
||||
$name = $this->manufacturer->name.' '.$this->name;
|
||||
if ($this->modelno) {
|
||||
$name .=" / ".$this->modelno;
|
||||
if ($this->model_number) {
|
||||
$name .=" / ".$this->model_number;
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
|
@ -161,7 +162,7 @@ class AssetModel extends Model
|
|||
{
|
||||
|
||||
return $query->where('name', 'LIKE', "%$search%")
|
||||
->orWhere('modelno', 'LIKE', "%$search%")
|
||||
->orWhere('model_number', 'LIKE', "%$search%")
|
||||
->orWhere(function ($query) use ($search) {
|
||||
$query->whereHas('depreciation', function ($query) use ($search) {
|
||||
$query->where('name', 'LIKE', '%'.$search.'%');
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
|
||||
/**
|
||||
* Model for Categories. Categories are a higher-level group
|
||||
|
@ -14,7 +15,7 @@ use App\Http\Traits\UniqueUndeletedTrait;
|
|||
*
|
||||
* @version v1.0
|
||||
*/
|
||||
class Category extends Model
|
||||
class Category extends SnipeModel
|
||||
{
|
||||
|
||||
use SoftDeletes;
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
use App\Models\SnipeModel;
|
||||
use Auth;
|
||||
use DB;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
/**
|
||||
* Model for Companies.
|
||||
*
|
||||
* @version v1.8
|
||||
*/
|
||||
final class Company extends Model
|
||||
final class Company extends SnipeModel
|
||||
{
|
||||
protected $table = 'companies';
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ use App\Models\Company;
|
|||
use App\Models\ConsumableAssignment;
|
||||
use App\Models\Location;
|
||||
use App\Models\Loggable;
|
||||
use App\Models\SnipeModel;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
@ -17,7 +18,7 @@ use Watson\Validating\ValidatingTrait;
|
|||
*
|
||||
* @version v1.0
|
||||
*/
|
||||
class Component extends Model
|
||||
class Component extends SnipeModel
|
||||
{
|
||||
use CompanyableTrait;
|
||||
use Loggable;
|
||||
|
@ -32,7 +33,7 @@ class Component extends Model
|
|||
*/
|
||||
public $rules = array(
|
||||
'name' => 'required|min:3|max:255',
|
||||
'total_qty' => 'required|integer|min:1',
|
||||
'qty' => 'required|integer|min:1',
|
||||
'category_id' => 'required|integer',
|
||||
'company_id' => 'integer',
|
||||
'purchase_date' => 'date',
|
||||
|
@ -100,7 +101,7 @@ class Component extends Model
|
|||
}
|
||||
|
||||
|
||||
$total = $this->total_qty;
|
||||
$total = $this->qty;
|
||||
$remaining = $total - $checkedout;
|
||||
return $remaining;
|
||||
}
|
||||
|
@ -141,7 +142,7 @@ class Component extends Model
|
|||
});
|
||||
})->orWhere('components.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('components.order_number', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('components.serial_number', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('components.serial', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('components.purchase_cost', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('components.purchase_date', 'LIKE', '%'.$search.'%');
|
||||
}
|
||||
|
|
|
@ -7,12 +7,13 @@ use App\Models\Company;
|
|||
use App\Models\ConsumableAssignment;
|
||||
use App\Models\Location;
|
||||
use App\Models\Loggable;
|
||||
use App\Models\SnipeModel;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
class Consumable extends Model
|
||||
class Consumable extends SnipeModel
|
||||
{
|
||||
use CompanyableTrait;
|
||||
use Loggable;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\Depreciation;
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Depreciable extends Model
|
||||
class Depreciable extends SnipeModel
|
||||
{
|
||||
/**
|
||||
* Depreciation Relation, and associated helper methods
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
class Depreciation extends Model
|
||||
class Depreciation extends SnipeModel
|
||||
{
|
||||
// Declare the rules for the form validation
|
||||
protected $rules = array(
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\SnipeModel;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Group extends Model
|
||||
class Group extends SnipeModel
|
||||
{
|
||||
protected $table = 'groups';
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
use App\Models\Asset;
|
||||
use App\Models\SnipeModel;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\User;
|
||||
use App\Models\Asset;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
|
||||
class Location extends Model
|
||||
class Location extends SnipeModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
@ -16,8 +17,8 @@ class Location extends Model
|
|||
protected $rules = array(
|
||||
'name' => 'required|min:3|max:255|unique_undeleted',
|
||||
'city' => 'min:3|max:255',
|
||||
'state' => 'min:2|max:32',
|
||||
'country' => 'min:2|max:2|max:2',
|
||||
'state' => 'min:0|max:2',
|
||||
'country' => 'min:2|max:2',
|
||||
'address' => 'min:5|max:80',
|
||||
'address2' => 'min:2|max:80',
|
||||
'zip' => 'min:3|max:10',
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
class Manufacturer extends Model
|
||||
class Manufacturer extends SnipeModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
|
14
app/Models/SnipeModel.php
Normal file
14
app/Models/SnipeModel.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SnipeModel extends Model
|
||||
{
|
||||
//
|
||||
public function getDisplayNameAttribute()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
|
||||
class Statuslabel extends Model
|
||||
class Statuslabel extends SnipeModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
use ValidatingTrait;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
use App\Models\SnipeModel;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
use App\Http\Traits\UniqueUndeletedTrait;
|
||||
|
||||
class Supplier extends Model
|
||||
class Supplier extends SnipeModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
@ -14,14 +15,14 @@ class Supplier extends Model
|
|||
|
||||
protected $rules = array(
|
||||
'name' => 'required|min:3|max:255|unique_undeleted',
|
||||
'address' => 'min:3|max:255',
|
||||
'address2' => 'min:2|max:255',
|
||||
'address' => 'min:3|max:50',
|
||||
'address2' => 'min:2|max:50',
|
||||
'city' => 'min:3|max:255',
|
||||
'state' => 'min:0|max:32',
|
||||
'state' => 'min:0|max:2',
|
||||
'country' => 'min:0|max:2',
|
||||
'fax' => 'min:7|max:20',
|
||||
'phone' => 'min:7|max:20',
|
||||
'contact' => 'min:0|max:255',
|
||||
'contact' => 'min:0|max:100',
|
||||
'notes' => 'min:0|max:255',
|
||||
'email' => 'email|min:5|max:150',
|
||||
'zip' => 'min:0|max:10',
|
||||
|
|
|
@ -64,6 +64,11 @@ class AppServiceProvider extends ServiceProvider
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
// Share common variables with all views.
|
||||
view()->composer('*', function ($view) {
|
||||
$view->with('snipeSettings', \App\Models\Setting::getSettings());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,13 +12,6 @@ settings:
|
|||
extensions:
|
||||
enabled:
|
||||
- Codeception\Extension\RunFailed
|
||||
modules:
|
||||
config:
|
||||
Db:
|
||||
dsn: ''
|
||||
user: ''
|
||||
password: ''
|
||||
dump: tests/_data/dump.sql
|
||||
coverage:
|
||||
enabled: true
|
||||
include:
|
||||
|
|
|
@ -35,7 +35,7 @@ $factory->defineAs(App\Models\AssetModel::class, 'assetmodel', function (Faker\G
|
|||
'name' => $faker->catchPhrase,
|
||||
'manufacturer_id' => $faker->numberBetween(1,10),
|
||||
'category_id' => $faker->numberBetween(1,9),
|
||||
'modelno' => $faker->numberBetween(1000000,50000000),
|
||||
'model_number' => $faker->numberBetween(1000000,50000000),
|
||||
'eol' => 1,
|
||||
];
|
||||
});
|
||||
|
@ -95,7 +95,7 @@ $factory->defineAs(App\Models\Component::class, 'component', function (Faker\Gen
|
|||
return [
|
||||
'name' => $faker->text(20),
|
||||
'category_id' => $faker->numberBetween(21,25),
|
||||
'total_qty' => $faker->numberBetween(3, 10),
|
||||
'qty' => $faker->numberBetween(3, 10),
|
||||
'min_amt' => $faker->numberBetween($min = 1, $max = 2),
|
||||
'company_id' => \App\Models\Company::inRandomOrder()->first()->id
|
||||
];
|
||||
|
@ -332,7 +332,7 @@ $factory->defineAs(App\Models\Actionlog::class, 'consumable-checkout', function
|
|||
});
|
||||
|
||||
$factory->defineAs(App\Models\Actionlog::class, 'component-checkout', function (Faker\Generator $faker) {
|
||||
$company = \App\Models\Company::has('users')->has('components')->inRandomOrder()->first();
|
||||
$company = \App\Models\Company::has('users')->has('components')->inRandomOrder()->first();
|
||||
|
||||
return [
|
||||
'user_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RenameModelnoToModelNumber extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('models', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('modelno', 'model_number');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('models', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('model_number', 'modelno');
|
||||
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RenameConsumableModelnoToModelNumber extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('consumables', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('model_no', 'model_number');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('consumables', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('model_number', 'model_no');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RenameModelNoteToNotes extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('models', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('note', 'notes');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('models', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('notes', 'note');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RenameComponentTotalQtyToQty extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('components', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('total_qty', 'qty');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('components', function (Blueprint $table) {
|
||||
//
|
||||
$table->renameColumn('qty', 'total_qty');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RenameComponentSerialNumberToSerial extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('components', function ($table) {
|
||||
$table->renameColumn('serial_number', 'serial');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('components', function ($table) {
|
||||
$table->renameColumn('serial', 'serial_number');
|
||||
});
|
||||
}
|
||||
}
|
0
public/uploads/.gitkeep
Normal file → Executable file
0
public/uploads/.gitkeep
Normal file → Executable file
0
public/uploads/assets/.gitkeep
Normal file → Executable file
0
public/uploads/assets/.gitkeep
Normal file → Executable file
0
public/uploads/barcodes/.gitkeep
Normal file → Executable file
0
public/uploads/barcodes/.gitkeep
Normal file → Executable file
|
@ -5,18 +5,14 @@ return array(
|
|||
'about_accessories_text' => 'Accessories are anything you issue to users but that do not have a serial number (or you do not care about tracking them uniquely). For example, computer mice or keyboards.',
|
||||
'accessory_category' => 'Accessory Category',
|
||||
'accessory_name' => 'Accessory Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'checkout' => 'Checkout Accessory',
|
||||
'checkin' => 'Checkin Accessory',
|
||||
'create' => 'Create Accessory',
|
||||
'date' => 'Purchase Date',
|
||||
'edit' => 'Edit Accessory',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'order' => 'Order Number',
|
||||
'qty' => 'QTY',
|
||||
'total' => 'Total',
|
||||
'remaining' => 'Avail',
|
||||
'update' => 'Update Accessory',
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
return [
|
||||
'title' => 'Asset Maintenance',
|
||||
'asset_name' => 'Asset Name',
|
||||
'supplier_name' => 'Supplier Name',
|
||||
'is_warranty' => 'Warranty',
|
||||
'dl_csv' => 'Download CSV'
|
||||
];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
'about_asset_categories' => 'About Asset Categories',
|
||||
'about_categories' => 'Asset categories help you organize your assets. Some example categories might be "Desktops", "Laptops", "Mobile Phones", "Tablets", and so on, but you can use asset categories any way that makes sense for you.',
|
||||
'about_categories_title' => 'About Categories',
|
||||
'about_categories' => 'Categories help you organize your items. Some example categories might be "Desktops", "Laptops", "Mobile Phones", "Tablets", and so on, but you can use categories any way that makes sense for you.',
|
||||
'asset_categories' => 'Asset Categories',
|
||||
'category_name' => 'Category Name',
|
||||
'checkin_email' => 'Send email to user on checkin.',
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
return [
|
||||
'about_companies_title' => 'About Companies',
|
||||
'about_companies_text' => 'Companies can be used as a simple identifier field, or can be used to limit visibility of assets, users, etc if full company support is enabled in your Admin settings.',
|
||||
'select_company' => 'Select Company',
|
||||
];
|
||||
|
|
|
@ -5,11 +5,8 @@ return array(
|
|||
'about_consumables_text' => 'Consumables are anything purchased that will be used up over time. For example, printer ink or copier paper.',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'update' => 'Update Consumable',
|
||||
|
|
|
@ -4,9 +4,9 @@ return array(
|
|||
'about_asset_depreciations' => 'About Asset Depreciations',
|
||||
'about_depreciations' => 'You can set up asset depreciations to depreciate assets based on straight-line depreciation.',
|
||||
'asset_depreciations' => 'Asset Depreciations',
|
||||
'create_depreciation' => 'Create Depreciation',
|
||||
'create' => 'Create Depreciation',
|
||||
'depreciation_name' => 'Depreciation Name',
|
||||
'number_of_months' => 'Number of Months',
|
||||
'update_depreciation' => 'Update Depreciation',
|
||||
'update' => 'Update Depreciation',
|
||||
|
||||
);
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'about_groups_title' => 'About Groups',
|
||||
'about_groups' => 'Groups are used to generalize user permissions.',
|
||||
'group_management' => 'Group Management',
|
||||
'create_group' => 'Create New Group',
|
||||
'edit_group' => 'Edit Group',
|
||||
'create' => 'Create New Group',
|
||||
'update' => 'Edit Group',
|
||||
'group_name' => 'Group Name',
|
||||
'group_admin' => 'Group Admin',
|
||||
'allow' => 'Allow',
|
||||
|
|
|
@ -15,7 +15,6 @@ return array(
|
|||
'create' => 'Create Asset',
|
||||
'date' => 'Purchase Date',
|
||||
'depreciates_on' => 'Depreciates On',
|
||||
'depreciation' => 'Depreciation',
|
||||
'default_location' => 'Default Location',
|
||||
'eol_date' => 'EOL Date',
|
||||
'eol_rate' => 'EOL Rate',
|
||||
|
@ -35,7 +34,6 @@ return array(
|
|||
'select_statustype' => 'Select Status Type',
|
||||
'serial' => 'Serial',
|
||||
'status' => 'Status',
|
||||
'supplier' => 'Supplier',
|
||||
'tag' => 'Asset Tag',
|
||||
'update' => 'Asset Update',
|
||||
'warranty' => 'Warranty',
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
'about_assets_title' => 'About Assets',
|
||||
'about_assets_text' => 'Assets are items tracked by serial number or asset tag. They tend to be higher value items where identifying a specific item matters.',
|
||||
'archived' => 'Archived',
|
||||
'asset' => 'Asset',
|
||||
'bulk_checkout' => 'Checkout Assets to User',
|
||||
|
|
|
@ -4,23 +4,16 @@ return array(
|
|||
|
||||
'asset' => 'Asset',
|
||||
'checkin' => 'Checkin',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create License',
|
||||
'date' => 'Purchase Date',
|
||||
'depreciation' => 'Depreciation',
|
||||
'expiration' => 'Expiration Date',
|
||||
'license_key' => 'Product Key',
|
||||
'maintained' => 'Maintained',
|
||||
'name' => 'Software Name',
|
||||
'no_depreciation' => 'Do Not Depreciate',
|
||||
'notes' => 'Notes',
|
||||
'order' => 'Order No.',
|
||||
'purchase_order' => 'Purchase Order Number',
|
||||
'reassignable' => 'Reassignable',
|
||||
'remaining_seats' => 'Remaining Seats',
|
||||
'seats' => 'Seats',
|
||||
'serial' => 'Serial',
|
||||
'supplier' => 'Supplier',
|
||||
'termination_date' => 'Termination Date',
|
||||
'to_email' => 'Licensed to Email',
|
||||
'to_name' => 'Licensed to Name',
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'about_licenses_title' => 'About Licenses',
|
||||
'about_licenses' => 'Licenses are used to track software. They have a specified number of seats that can be checked out to individuals',
|
||||
'checkin' => 'Checkin License Seat',
|
||||
'checkout_history' => 'Checkout History',
|
||||
'checkout' => 'Checkout License Seat',
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
'assets_rtd' => 'Assets', // This has NEVER meant Assets Retired. I don't know how it keeps getting reverted.
|
||||
'assets_checkedout' => 'Assets Assigned',
|
||||
'id' => 'ID',
|
||||
'city' => 'City',
|
||||
'state' => 'State',
|
||||
'country' => 'Country',
|
||||
'create' => 'Create Location',
|
||||
'update' => 'Update Location',
|
||||
'name' => 'Location Name',
|
||||
'address' => 'Address',
|
||||
'zip' => 'Postal Code',
|
||||
'locations' => 'Locations',
|
||||
'parent' => 'Parent',
|
||||
'currency' => 'Location Currency',
|
||||
);
|
||||
'about_locations_title' => 'About Locations',
|
||||
'about_locations' => 'Locations are used to track location information for users, assets, and other items',
|
||||
'assets_rtd' => 'Assets', // This has NEVER meant Assets Retired. I don't know how it keeps getting reverted.
|
||||
'assets_checkedout' => 'Assets Assigned',
|
||||
'id' => 'ID',
|
||||
'city' => 'City',
|
||||
'state' => 'State',
|
||||
'country' => 'Country',
|
||||
'create' => 'Create Location',
|
||||
'update' => 'Update Location',
|
||||
'name' => 'Location Name',
|
||||
'address' => 'Address',
|
||||
'zip' => 'Postal Code',
|
||||
'locations' => 'Locations',
|
||||
'parent' => 'Parent',
|
||||
'currency' => 'Location Currency',
|
||||
);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'about_manufacturers_title' => 'About manufacturers',
|
||||
'about_manufacturers_text' => 'Manufacturers make all the magic items we consume.',
|
||||
'asset_manufacturers' => 'Asset Manufacturers',
|
||||
'create' => 'Create Manufacturer',
|
||||
'id' => 'ID',
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'about_models_title' => 'About Asset Models',
|
||||
'about_models_text' => 'Asset Models are a way to group identical assets. "MBP 2013", "IPhone 6s", etc.',
|
||||
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
|
||||
'restore' => 'Restore Model',
|
||||
'requestable' => 'Users may request this model',
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
'about_suppliers_title' => 'About Suppliers',
|
||||
'about_suppliers_text' => 'Suppliers are used to track the source of items',
|
||||
'address' => 'Supplier Address',
|
||||
'assets' => 'Assets',
|
||||
'city' => 'City',
|
||||
|
|
|
@ -113,6 +113,7 @@
|
|||
'no_results' => 'No Results.',
|
||||
'no' => 'No',
|
||||
'notes' => 'Notes',
|
||||
'order_number' => 'Order Number',
|
||||
'page_menu' => 'Showing _MENU_ items',
|
||||
'pagination_info' => 'Showing _START_ to _END_ of _TOTAL_ items',
|
||||
'pending' => 'Pending',
|
||||
|
@ -121,6 +122,8 @@
|
|||
'previous' => 'Previous',
|
||||
'processing' => 'Processing',
|
||||
'profile' => 'Your profile',
|
||||
'purchase_cost' => 'Purchase Cost',
|
||||
'purchase_date' => 'Purchase Date',
|
||||
'qty' => 'QTY',
|
||||
'quantity' => 'Quantity',
|
||||
'ready_to_deploy' => 'Ready to Deploy',
|
||||
|
@ -151,6 +154,7 @@
|
|||
'state' => 'State',
|
||||
'status_labels' => 'Status Labels',
|
||||
'status' => 'Status',
|
||||
'supplier' => 'Supplier',
|
||||
'suppliers' => 'Suppliers',
|
||||
'submit' => 'Submit',
|
||||
'total_assets' => 'total assets',
|
||||
|
|
|
@ -1,211 +1,23 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($accessory->id)
|
||||
{{ trans('admin/accessories/general.update') }}
|
||||
@else
|
||||
{{ trans('admin/accessories/general.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary">
|
||||
{{ trans('general.back') }}</a>
|
||||
|
||||
|
||||
|
||||
@stop
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/accessories/general.create') ,
|
||||
'updateText' => trans('admin/accessories/general.update'),
|
||||
'helpTitle' => trans('admin/accessories/general.about_accessories_title'),
|
||||
'helpText' => trans('admin/accessories/general.about_accessories_text')
|
||||
])
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
@section('inputFields')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-header with-border">
|
||||
|
||||
<h3 class="box-title">
|
||||
@if ($accessory->id)
|
||||
{{ $accessory->name }}
|
||||
@endif
|
||||
</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- form start -->
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<div class="box-body">
|
||||
<div class="col-md-0 col-md-offset-1">
|
||||
@if (\App\Models\Company::isCurrentUserAuthorized())
|
||||
<!-- Company -->
|
||||
<div class="form-group{{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('company_id', trans('general.company')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('company_id', $company_list , Input::old('company_id', $accessory->company_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('company_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('name', trans('admin/accessories/general.accessory_name')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $accessory->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Category -->
|
||||
<div class="form-group{{ $errors->has('category_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('category_id', trans('admin/accessories/general.accessory_category')) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('category_id', $category_list , Input::old('category_id', $accessory->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('category_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Manufacturer -->
|
||||
<div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('manufacturer_id', trans('general.manufacturer')) }}
|
||||
</div>
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $accessory->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('manufacturer_id', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group{{ $errors->has('location_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('location_id', trans('general.location')) }}
|
||||
</div>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id', $accessory->location_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('location_id', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group{{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('order_number', trans('admin/accessories/general.order')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $accessory->order_number) }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group{{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('purchase_date', trans('admin/accessories/general.date')) }}
|
||||
</div>
|
||||
<div class="input-group col-md-3">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $accessory->purchase_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group{{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('purchase_cost', trans('admin/accessories/general.cost')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
</span>
|
||||
<input class="col-md-3 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($accessory->purchase_cost)) }}" />
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- QTY -->
|
||||
<div class="form-group{{ $errors->has('qty') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('qty', trans('admin/accessories/general.qty')) }}
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: -15px">
|
||||
<div class="col-md-3">
|
||||
<input class="form-control col-md-2" type="text" name="qty" id="qty" value="{{ Input::old('qty', $accessory->qty) }}" />
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{!! $errors->first('qty', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Min QTY -->
|
||||
<div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('min_amt', trans('general.min_amt')) }}
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: -15px">
|
||||
<div class="col-md-2">
|
||||
<input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $accessory->min_amt) }}" />
|
||||
</div>
|
||||
<div class="col-md-7" style="margin-left: -15px;">
|
||||
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="slideout-menu">
|
||||
<a href="#" class="slideout-menu-toggle pull-right">×</a>
|
||||
<h3>
|
||||
{{ trans('admin/accessories/general.about_accessories_title') }}
|
||||
</h3>
|
||||
<p>{{ trans('admin/accessories/general.about_accessories_text') }} </p>
|
||||
</div>
|
||||
@include ('partials.forms.edit.company')
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')])
|
||||
@include ('partials.forms.edit.category')
|
||||
@include ('partials.forms.edit.manufacturer')
|
||||
@include ('partials.forms.edit.location')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.purchase_cost')
|
||||
@include ('partials.forms.edit.quantity')
|
||||
@include ('partials.forms.edit.minimum_quantity')
|
||||
|
||||
@stop
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<div class="table-responsive">
|
||||
<table
|
||||
name="accessories"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.accessories.list') }}"
|
||||
data-cookie="true"
|
||||
|
@ -38,9 +38,9 @@
|
|||
<th data-field="manufacturer" data-searchable="true" data-sortable="true">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="qty">{{ trans('admin/accessories/general.total') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/accessories/general.date') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_cost">{{ trans('admin/accessories/general.cost') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="order_number" data-visible="false">{{ trans('admin/accessories/general.order') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_date" data-visible="false">{{ trans('general.purchase_date') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
|
||||
<th data-searchable="false" data-sortable="true" data-field="min_amt">{{ trans('general.min_amt') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="numRemaining">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
|
@ -54,48 +54,7 @@
|
|||
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
exportOptions: {
|
||||
fileName: 'accessories-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'accessories-export', 'search' => true])
|
||||
@stop
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<div class="table table-responsive">
|
||||
<table
|
||||
name="accessory_users"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{ route('api.accessories.view', $accessory->id) }}"
|
||||
data-cookie="true"
|
||||
|
@ -81,43 +81,7 @@
|
|||
</div>
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js?v=1') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js?v=1') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
mobileResponsive: true,
|
||||
columnsHidden: ['name'],
|
||||
showExport: true,
|
||||
exportLabel: 'Export',
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'accessory' . $accessory->name . '-export', 'search' => false])
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->require_accept_signature=='1')
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<div class="col-md-12 col-sm-12 text-center" style="padding-top: 20px">
|
||||
|
||||
<h3>Sign below to indicate that you agree to the terms of service:</h3>
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
|
||||
|
||||
<!-- Two factor opt in -->
|
||||
@if (\App\Models\Setting::getSettings()->two_factor_enabled=='1')
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
|
||||
<div class="form-group {{ $errors->has('avatar') ? 'has-error' : '' }}">
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
@if (\App\Models\Setting::getSettings()->display_asset_name)
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/form.name') }}</th>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/form.name') }}</th>
|
||||
@endif
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||
|
@ -53,20 +53,18 @@
|
|||
{{ csrf_field() }}
|
||||
<td>{{ $asset->model->name }}</td>
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->display_asset_name)
|
||||
<td>{{ $asset->name }}</td>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<td>{{ $asset->name }}</td>
|
||||
@endif
|
||||
|
||||
<td>{{ $asset->serial }}</td>
|
||||
|
||||
<td>
|
||||
@if ($asset->assigneduser && $asset->assetloc)
|
||||
{{ $asset->assetloc->name }}
|
||||
{{ $asset->assetloc->name }}
|
||||
@elseif ($asset->defaultLoc)
|
||||
{{ $asset->defaultLoc->name }}
|
||||
|
||||
{{ $asset->defaultLoc->name }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
|
||||
<td>Checked out</td>
|
||||
|
|
|
@ -53,25 +53,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Supplier -->
|
||||
<div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
|
||||
<label for="supplier_id" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/table.supplier_name') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($assetMaintenance, 'supplier_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $assetMaintenance->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px']) }}
|
||||
{!! $errors->first('supplier_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@include ('partials.forms.edit.supplier')
|
||||
@include ('partials.forms.edit.maintenance_type')
|
||||
|
||||
|
||||
<!-- Improvement Type -->
|
||||
<div class="form-group {{ $errors->has('asset_maintenance_type') ? ' has-error' : '' }}">
|
||||
<label for="asset_maintenance_type" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($assetMaintenance, 'asset_maintenance_type')) ? ' required' : '' }}">
|
||||
{{ Form::select('asset_maintenance_type', $assetMaintenanceType , Input::old('asset_maintenance_type', $assetMaintenance->asset_maintenance_type), ['class'=>'select2', 'style'=>'min-width:350px']) }}
|
||||
{!! $errors->first('asset_maintenance_type', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Title -->
|
||||
<div class="form-group {{ $errors->has('title') ? ' has-error' : '' }}">
|
||||
|
@ -121,7 +106,7 @@
|
|||
<label for="cost" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.cost') }}</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{ \App\Models\Setting::first()->default_currency }}</span>
|
||||
<span class="input-group-addon">{{ $snipeSettings->default_currency }}</span>
|
||||
<input class="col-md-2 form-control" type="text" name="cost" id="cost" value="{{ Input::old('cost', \App\Helpers\Helper::formatCurrencyOutput($assetMaintenance->cost)) }}" />
|
||||
{!! $errors->first('cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<table
|
||||
name="maintenances"
|
||||
id="table"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.asset_maintenances.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
|
@ -56,46 +56,5 @@
|
|||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
exportOptions: {
|
||||
fileName: 'maintenances-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'maintenances-export'])
|
||||
@stop
|
||||
|
|
|
@ -1,148 +1,86 @@
|
|||
@extends('layouts/default')
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/categories/general.create') ,
|
||||
'updateText' => trans('admin/categories/general.update'),
|
||||
'helpTitle' => trans('admin/categories/general.about_categories_title'),
|
||||
'helpText' => trans('admin/categories/general.about_categories')
|
||||
])
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($category->id)
|
||||
{{ trans('admin/categories/general.update') }}
|
||||
@else
|
||||
{{ trans('admin/categories/general.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.category_name')])
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
<!-- Type -->
|
||||
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
|
||||
<label for="category_type" class="col-md-3 control-label">{{ trans('general.type') }}</label>
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('category_type', $category_types , Input::old('category_type', $item->category_type), array('class'=>'select2', 'style'=>'min-width:350px', $item->itemCount() > 0 ? 'disabled' : '')) }}
|
||||
{!! $errors->first('category_type', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
@if ($category->id)
|
||||
<div class="panel-heading">
|
||||
<h3 class="box-title"> {{ $category->name }}</h3>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('name', trans('admin/categories/general.category_name')) }}
|
||||
|
||||
</div>
|
||||
<div class="col-md-8 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $category->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Type -->
|
||||
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('category_type', trans('general.type')) }}
|
||||
</div>
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('category_type', $category_types , Input::old('category_type', $category->category_type), array('class'=>'select2', 'style'=>'min-width:350px', $category->itemCount() > 0 ? 'disabled' : '')) }}
|
||||
{!! $errors->first('category_type', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- EULA text -->
|
||||
<div class="form-group {{ $errors->has('eula_text') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('eula_text', trans('admin/categories/general.eula_text')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::textarea('eula_text', Input::old('eula_text', $category->eula_text), array('class' => 'form-control')) }}
|
||||
<!-- EULA text -->
|
||||
<div class="form-group {{ $errors->has('eula_text') ? 'error' : '' }}">
|
||||
<label for="eula_text" class="col-md-3 control-label">{{ trans('admin/categories/general.eula_text') }}</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::textarea('eula_text', Input::old('eula_text', $item->eula_text), array('class' => 'form-control')) }}
|
||||
<p class="help-block">{!! trans('admin/categories/general.eula_text_help') !!} </p>
|
||||
<p class="help-block">{!! trans('admin/settings/general.eula_markdown') !!} </p>
|
||||
|
||||
{!! $errors->first('eula_text', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Use default checkbox -->
|
||||
<div class="checkbox col-md-offset-3">
|
||||
<label>
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->default_eula_text!='')
|
||||
{{ Form::checkbox('use_default_eula', '1', Input::old('use_default_eula', $category->use_default_eula)) }}
|
||||
{!! trans('admin/categories/general.use_default_eula') !!}
|
||||
@else
|
||||
{{ Form::checkbox('use_default_eula', '0', Input::old('use_default_eula'), array('disabled' => 'disabled')) }}
|
||||
{!! trans('admin/categories/general.use_default_eula_disabled') !!}
|
||||
@endif
|
||||
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Require Acceptance -->
|
||||
<div class="checkbox col-md-offset-3">
|
||||
<label>
|
||||
{{ Form::checkbox('require_acceptance', '1', Input::old('require_acceptance', $category->require_acceptance)) }}
|
||||
{{ trans('admin/categories/general.require_acceptance') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Email on Checkin -->
|
||||
<div class="checkbox col-md-offset-3">
|
||||
<label>
|
||||
{{ Form::checkbox('checkin_email', '1', Input::old('checkin_email', $category->checkin_email)) }}
|
||||
{{ trans('admin/categories/general.checkin_email') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>{{ trans('admin/categories/general.about_asset_categories') }}</h4>
|
||||
<p>{{ trans('admin/categories/general.about_categories') }} </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->default_eula_text!='')
|
||||
<!-- Use default checkbox -->
|
||||
<div class="checkbox col-md-offset-3">
|
||||
<label>
|
||||
|
||||
@if ($snipeSettings->default_eula_text!='')
|
||||
{{ Form::checkbox('use_default_eula', '1', Input::old('use_default_eula', $item->use_default_eula)) }}
|
||||
{!! trans('admin/categories/general.use_default_eula') !!}
|
||||
@else
|
||||
{{ Form::checkbox('use_default_eula', '0', Input::old('use_default_eula'), array('disabled' => 'disabled')) }}
|
||||
{!! trans('admin/categories/general.use_default_eula_disabled') !!}
|
||||
@endif
|
||||
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Require Acceptance -->
|
||||
<div class="checkbox col-md-offset-3">
|
||||
<label>
|
||||
{{ Form::checkbox('require_acceptance', '1', Input::old('require_acceptance', $item->require_acceptance)) }}
|
||||
{{ trans('admin/categories/general.require_acceptance') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Email on Checkin -->
|
||||
<div class="checkbox col-md-offset-3">
|
||||
<label>
|
||||
{{ Form::checkbox('checkin_email', '1', Input::old('checkin_email', $item->checkin_email)) }}
|
||||
{{ trans('admin/categories/general.checkin_email') }}
|
||||
</label>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@parent
|
||||
@if ($snipeSettings->default_eula_text!='')
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="eulaModal" tabindex="-1" role="dialog" aria-labelledby="eulaModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="eulaModalLabel">{{ trans('admin/settings/general.default_eula_text') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ \App\Models\Setting::getDefaultEula() }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="eulaModalLabel">{{ trans('admin/settings/general.default_eula_text') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ \App\Models\Setting::getDefaultEula() }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
@stop
|
|
@ -23,7 +23,7 @@
|
|||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
name="categories"
|
||||
id="table"
|
||||
data-url="{{route('api.categories.list') }}"
|
||||
|
@ -51,49 +51,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
exportOptions: {
|
||||
fileName: 'categories-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'categories-export', 'search' => true])
|
||||
@stop
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@stop
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
<table
|
||||
name="category_assets"
|
||||
class="snipe-table"
|
||||
id="table"
|
||||
data-url="{{ route('api.categories.'.$category->category_type.'.view', [$category->id, $category->category_type]) }}"
|
||||
data-cookie="true"
|
||||
|
@ -59,46 +60,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
//search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'category-' . $category->name . '-export', 'search' => false])
|
||||
@stop
|
||||
|
|
|
@ -1,74 +1,11 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($company->id)
|
||||
{{ trans('admin/companies/table.update') }}
|
||||
@else
|
||||
{{ trans('admin/companies/table.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/companies/table.create') ,
|
||||
'updateText' => trans('admin/companies/table.update'),
|
||||
'helpTitle' => trans('admin/companies/general.about_companies_title'),
|
||||
'helpText' => trans('admin/companies/general.about_companies_text')
|
||||
])
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<div class="box box-default">
|
||||
@if ($company->id)
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $company->name }}</h3>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Company Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ trans('admin/companies/table.name') }}
|
||||
<i class='fa fa-asterisk'></i></label>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $company->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Company Name -->
|
||||
|
||||
</div>
|
||||
<!-- /Panel body -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
<!-- /Panel footer -->
|
||||
</div>
|
||||
<!-- /Panel -->
|
||||
</form>
|
||||
</div>
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
|
||||
<h4>About Companies</h4>
|
||||
<p>
|
||||
Companies can be used as a simple identifier field, or can be used to limit visibility of assets, users, etc if full company support is enabled in your Admin settings.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('inputFields')
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/companies/table.name')])
|
||||
@stop
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped" name="companies">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">{{ trans('general.id') }}</th>
|
||||
|
|
|
@ -1,198 +1,22 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($component->id)
|
||||
{{ trans('admin/components/general.update') }}
|
||||
@else
|
||||
{{ trans('admin/components/general.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/components/general.create') ,
|
||||
'updateText' => trans('admin/components/general.update'),
|
||||
'helpTitle' => trans('admin/components/general.about_components_title'),
|
||||
'helpText' => trans('admin/components/general.about_components_text')
|
||||
])
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
@if ($component->id)
|
||||
{{ $component->name }}
|
||||
@endif
|
||||
</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/components/table.title'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $component->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Category -->
|
||||
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('category_id', trans('general.category'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8 required">
|
||||
{{ Form::select('category_id', $category_list , Input::old('category_id', $component->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('category_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- QTY -->
|
||||
<div class="form-group {{ $errors->has('total_qty') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('total_qty', trans('general.quantity'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-2 required">
|
||||
<input class="form-control" type="text" name="total_qty" id="total_qty" value="{{ Input::old('qty', $component->total_qty) }}" />
|
||||
|
||||
</div>
|
||||
{!! $errors->first('total_qty', ' <div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fa fa-times"></i> :message</span></div>') !!}
|
||||
</div>
|
||||
|
||||
<!-- Min QTY -->
|
||||
<div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('min_amt', trans('general.min_amt'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-2">
|
||||
<input class="form-control" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $component->min_amt) }}" />
|
||||
</div>
|
||||
<div class="col-md-1 text-left">
|
||||
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Serial -->
|
||||
<div class="form-group {{ $errors->has('serial_number') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.serial'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="serial_number" id="serial_number" value="{{ Input::old('serial_number', $component->serial_number) }}" />
|
||||
{!! $errors->first('serial_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::isCurrentUserAuthorized())
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('company_id', $company_list , Input::old('company_id', $component->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('location_id') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('location_id', trans('general.location'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id', $component->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
|
||||
{!! $errors->first('location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('order_number', trans('admin/components/general.order'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $component->order_number) }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('purchase_date', trans('admin/components/general.date'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="input-group col-md-3">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $component->purchase_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('purchase_cost', trans('admin/components/general.cost'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
</span>
|
||||
<input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($component->purchase_cost)) }}" />
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="slideout-menu">
|
||||
<a href="#" class="slideout-menu-toggle pull-right">×</a>
|
||||
<h3>
|
||||
{{ trans('admin/components/general.about_components_title') }}
|
||||
</h3>
|
||||
<p>{{ trans('admin/components/general.about_components_text') }}</p>
|
||||
</div>
|
||||
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/components/table.title')])
|
||||
@include ('partials.forms.edit.category')
|
||||
@include ('partials.forms.edit.quantity')
|
||||
@include ('partials.forms.edit.minimum_quantity')
|
||||
@include ('partials.forms.edit.serial')
|
||||
@include ('partials.forms.edit.company')
|
||||
@include ('partials.forms.edit.location')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.purchase_cost')
|
||||
|
||||
@stop
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<table
|
||||
data-toolbar="#toolbar"
|
||||
name="components"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.components.list') }}"
|
||||
data-cookie="true"
|
||||
|
@ -73,50 +73,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
exportOptions: {
|
||||
fileName: 'components-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'components-export', 'search' => true])
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
@ -138,5 +98,3 @@
|
|||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<table
|
||||
name="component_users"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.components.view', $component->id)}}"
|
||||
data-cookie="true"
|
||||
|
@ -75,9 +75,9 @@
|
|||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
|
||||
@if ($component->serial_number!='')
|
||||
@if ($component->serial!='')
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.serial') }}: </strong>
|
||||
{{ $component->serial_number }} </div>
|
||||
{{ $component->serial }} </div>
|
||||
@endif
|
||||
|
||||
@if ($component->purchase_date)
|
||||
|
@ -87,7 +87,7 @@
|
|||
|
||||
@if ($component->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.cost') }}:</strong>
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
{{ $snipeSettings->default_currency }}
|
||||
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($component->purchase_cost) }} </div>
|
||||
@endif
|
||||
|
@ -100,45 +100,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: false,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'component' . $component->name . '-export', 'search' => false])
|
||||
@stop
|
||||
|
|
|
@ -1,221 +1,23 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($consumable->id)
|
||||
{{ trans('admin/consumables/general.update') }}
|
||||
@else
|
||||
{{ trans('admin/consumables/general.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/consumables/general.create') ,
|
||||
'updateText' => trans('admin/consumables/general.update'),
|
||||
'helpTitle' => trans('admin/consumables/general.about_consumables_title'),
|
||||
'helpText' => trans('admin/consumables/general.about_consumables_text')
|
||||
])
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
@if ($consumable->id)
|
||||
{{ $consumable->name }}
|
||||
@endif
|
||||
</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::isCurrentUserAuthorized())
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('company_id', trans('general.company')) }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('company_id', $company_list , Input::old('company_id', $consumable->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('name', trans('admin/consumables/table.title')) }}
|
||||
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $consumable->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Category -->
|
||||
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('category_id', trans('general.category')) }}
|
||||
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('category_id', $category_list , Input::old('category_id', $consumable->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('category_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Manufacturer -->
|
||||
<div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('manufacturer_id', trans('general.manufacturer')) }}
|
||||
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $consumable->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('manufacturer_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('location_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('location_id', trans('general.location')) }}
|
||||
</div>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id', $consumable->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
|
||||
{!! $errors->first('location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Model Number -->
|
||||
<div class="form-group {{ $errors->has('model_no') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('model_no', trans('general.model_no')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="model_no" id="model_no" value="{{ Input::old('model_no', $consumable->model_no) }}" />
|
||||
{!! $errors->first('model_no', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Item Number -->
|
||||
<div class="form-group {{ $errors->has('item_no') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('item_no', trans('admin/consumables/general.item_no')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="item_no" id="item_no" value="{{ Input::old('item_no', $consumable->item_no) }}" />
|
||||
{!! $errors->first('item_no', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('order_number', trans('admin/consumables/general.order')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $consumable->order_number) }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('purchase_date', trans('admin/consumables/general.date')) }}
|
||||
</div>
|
||||
<div class="input-group col-md-3">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $consumable->purchase_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('purchase_cost', trans('admin/consumables/general.cost')) }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
</span>
|
||||
<input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($consumable->purchase_cost)) }}" />
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- QTY -->
|
||||
<div class="form-group {{ $errors->has('qty') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('qty', trans('general.quantity')) }}
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: -15px">
|
||||
<div class="col-md-2">
|
||||
<input class="form-control" type="text" name="qty" id="qty" value="{{ Input::old('qty', $consumable->qty) }}" />
|
||||
</div>
|
||||
{!! $errors->first('qty', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Min QTY -->
|
||||
<div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('min_amt', trans('general.min_amt')) }}
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: -15px">
|
||||
<div class="col-md-2">
|
||||
<input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $consumable->min_amt) }}" />
|
||||
</div>
|
||||
<div class="col-md-7" style="margin-left: -15px;">
|
||||
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="slideout-menu">
|
||||
<a href="#" class="slideout-menu-toggle pull-right">×</a>
|
||||
<h3>
|
||||
{{ trans('admin/consumables/general.about_consumables_title') }}
|
||||
</h3>
|
||||
<p>{{ trans('admin/consumables/general.about_consumables_text') }}</p>
|
||||
</div>
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.company')
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')])
|
||||
@include ('partials.forms.edit.category')
|
||||
@include ('partials.forms.edit.manufacturer')
|
||||
@include ('partials.forms.edit.location')
|
||||
@include ('partials.forms.edit.model_number')
|
||||
@include ('partials.forms.edit.item_number')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.purchase_cost')
|
||||
@include ('partials.forms.edit.quantity')
|
||||
@include ('partials.forms.edit.minimum_quantity')
|
||||
|
||||
@stop
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<div class="box-body">
|
||||
<table
|
||||
name="consumables"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.consumables.list') }}"
|
||||
data-cookie="true"
|
||||
|
@ -40,11 +40,11 @@
|
|||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/consumables/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
||||
<th data-sortable="true" data-field="manufacturer" data-visible="false">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-sortable="true" data-field="model_no" data-visible="false">{{ trans('general.model_no') }}</th>
|
||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
|
||||
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('admin/consumables/general.order') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/consumables/general.date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('admin/consumables/general.cost') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('general.purchase_date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
|
||||
|
||||
</tr>
|
||||
|
@ -58,48 +58,8 @@
|
|||
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
exportOptions: {
|
||||
fileName: 'consumables-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'consumables-export', 'search' => true])
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
<table
|
||||
name="consumable_users"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.consumables.view', $consumable->id)}}"
|
||||
data-cookie="true"
|
||||
|
@ -64,13 +64,13 @@
|
|||
|
||||
|
||||
@if ($consumable->purchase_date)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/consumables/general.date') }}: </strong>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.purchase_date') }}: </strong>
|
||||
{{ $consumable->purchase_date }} </div>
|
||||
@endif
|
||||
|
||||
@if ($consumable->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/consumables/general.cost') }}:</strong>
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.purchase_cost') }}:</strong>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($consumable->purchase_cost) }} </div>
|
||||
@endif
|
||||
|
@ -80,9 +80,9 @@
|
|||
{{ $consumable->item_no }} </div>
|
||||
@endif
|
||||
|
||||
@if ($consumable->model_no)
|
||||
@if ($consumable->model_number)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.model_no') }}:</strong>
|
||||
{{ $consumable->model_no }} </div>
|
||||
{{ $consumable->model_number }} </div>
|
||||
@endif
|
||||
|
||||
@if ($consumable->manufacturer)
|
||||
|
@ -91,53 +91,14 @@
|
|||
@endif
|
||||
|
||||
@if ($consumable->order_number)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/consumables/general.order') }}:</strong>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.order_number') }}:</strong>
|
||||
{{ $consumable->order_number }} </div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: false,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'consumable' . $consumable->name . '-export', 'search' => false])
|
||||
@stop
|
||||
|
|
|
@ -1,73 +1,24 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
|
||||
@if ($depreciation->id)
|
||||
{{ trans('admin/depreciations/general.update_depreciation') }}
|
||||
@else
|
||||
{{ trans('admin/depreciations/general.create_depreciation') }}
|
||||
@endif
|
||||
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/depreciations/general.create') ,
|
||||
'updateText' => trans('admin/depreciations/general.update'),
|
||||
'helpTitle' => trans('admin/depreciations/general.about_asset_depreciations'),
|
||||
'helpText' => trans('admin/depreciations/general.about_depreciations')
|
||||
])
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
@section('inputFields')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<div class="box box-default">
|
||||
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-4 control-label">{{ trans('admin/depreciations/general.depreciation_name') }}
|
||||
<i class='fa fa-asterisk'></i></label>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $depreciation->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/depreciations/general.depreciation_name')])
|
||||
<!-- Months -->
|
||||
<div class="form-group {{ $errors->has('months') ? ' has-error' : '' }}">
|
||||
<label for="months" class="col-md-3 control-label">{{ trans('admin/depreciations/general.number_of_months') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'months')) ? ' required' : '' }}">
|
||||
<div class="col-md-2" style="padding-left:0px">
|
||||
<input class="form-control" type="text" name="months" id="months" value="{{ Input::old('months', $item->months) }}" style="width: 80px;" />
|
||||
</div>
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('months') ? ' has-error' : '' }}">
|
||||
<label for="months" class="col-md-4 control-label">{{ trans('admin/depreciations/general.number_of_months') }}
|
||||
<i class='fa fa-asterisk'></i></label>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="months" id="months" value="{{ Input::old('months', $depreciation->months) }}" style="width: 80px;" />
|
||||
{!! $errors->first('months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>{{ trans('admin/depreciations/general.about_asset_depreciations') }}</h4>
|
||||
<p>{{ trans('admin/depreciations/general.about_depreciations') }} </p>
|
||||
</div>
|
||||
</div>
|
||||
{!! $errors->first('months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -22,7 +22,7 @@ Asset Depreciations
|
|||
<div class="table-responsive">
|
||||
<table
|
||||
name="depreciations"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{ route('api.depreciations.list') }}"
|
||||
data-cookie="true"
|
||||
|
@ -50,49 +50,8 @@ Asset Depreciations
|
|||
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
exportOptions: {
|
||||
fileName: 'depreciations-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'depreciations-export', 'search' => true])
|
||||
@stop
|
||||
|
|
|
@ -57,5 +57,5 @@
|
|||
<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@stop
|
||||
|
|
|
@ -87,5 +87,5 @@
|
|||
<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@stop
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<p>{{ trans('mail.a_user_canceled') }} <a href="{{ config('app.url') }}"> {{ \App\Models\Setting::getSettings()->site_name }}</a>. </p>
|
||||
<p>{{ trans('mail.a_user_canceled') }} <a href="{{ config('app.url') }}"> {{ $snipeSettings->site_name }}</a>. </p>
|
||||
|
||||
<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
|
||||
{{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<p>{{ trans('mail.a_user_requested') }} <a href="{{ config('app.url') }}"> {{ \App\Models\Setting::getSettings()->site_name }}</a>. </p>
|
||||
<p>{{ trans('mail.a_user_requested') }} <a href="{{ config('app.url') }}"> {{ $snipeSettings->site_name }}</a>. </p>
|
||||
|
||||
<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
|
||||
{{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<h2>{{ trans('mail.password_reset') }}</h2>
|
||||
|
||||
<div>
|
||||
{{ trans('mail.to_reset', ['web' => \App\Models\Setting::getSettings()->site_name]) }} {{ URL::to('password/reset', array($token)) }}.
|
||||
{{ trans('mail.to_reset', ['web' => $snipeSettings->site_name]) }} {{ URL::to('password/reset', array($token)) }}.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -45,5 +45,5 @@
|
|||
@endif
|
||||
</table>
|
||||
|
||||
<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@stop
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
@section('content')
|
||||
<p>{{ trans('mail.hello') }} {{ $user->first_name }},</p>
|
||||
|
||||
<p>{{ trans('mail.link_to_update_password', ['web' => \App\Models\Setting::getSettings()->site_name]) }} </p>
|
||||
<p>{{ trans('mail.link_to_update_password', ['web' => $snipeSettings->site_name]) }} </p>
|
||||
|
||||
<p><a href="{{ $forgotPasswordUrl }}">{{ $forgotPasswordUrl }}</a></p>
|
||||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@stop
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
@section('content')
|
||||
<p>{{ trans('mail.hello') }} {{ $user->first_name }},</p>
|
||||
|
||||
<p>{{ trans('mail.welcome_to', ['web' => \App\Models\Setting::getSettings()->site_name]) }} {{ trans('mail.click_to_confirm', ['web' => \App\Models\Setting::getSettings()->site_name]) }}</p>
|
||||
<p>{{ trans('mail.welcome_to', ['web' => $snipeSettings->site_name]) }} {{ trans('mail.click_to_confirm', ['web' => $snipeSettings->site_name]) }}</p>
|
||||
|
||||
<p><a href="{{ $activationUrl }}">{{ $activationUrl }}</a></p>
|
||||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@stop
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
@section('content')
|
||||
<p>{{ trans('mail.hello') }} {{ $first_name }},</p>
|
||||
|
||||
<p>{{ trans('mail.admin_has_created', ['web' => \App\Models\Setting::getSettings()->site_name]) }} </p>
|
||||
<p>{{ trans('mail.admin_has_created', ['web' => $snipeSettings->site_name]) }} </p>
|
||||
|
||||
<p>URL: <a href="{{ config('app.url') }}">{{ config('app.url') }}</a><br>
|
||||
{{ trans('mail.login') }} {{ $username }} <br>
|
||||
|
@ -12,5 +12,5 @@
|
|||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
@stop
|
||||
|
|
|
@ -1,101 +1,57 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Web site Title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/groups/titles.edit_group') }}
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/groups/titles.create') ,
|
||||
'updateText' => trans('admin/groups/titles.update'),
|
||||
'helpTitle' => trans('admin/groups/general.about_groups_title'),
|
||||
'helpText' => trans('admin/groups/general.about_groups_text'),
|
||||
'item' => $group
|
||||
])
|
||||
@section('content')
|
||||
<style>
|
||||
label.radio-padding {
|
||||
margin-right: 25px;
|
||||
}
|
||||
</style>
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('groups') }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
{{-- Content --}}
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
label.radio-padding {
|
||||
margin-right: 25px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($group->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ $group->name }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}
|
||||
<i class='fa fa-asterisk'></i></label>
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
|
||||
@foreach ($permissions as $area => $permission)
|
||||
|
||||
@for ($i = 0; $i < count($permission); $i++)
|
||||
<?php
|
||||
$permission_name = $permission[$i]['permission'];
|
||||
?>
|
||||
|
||||
@if ($permission[$i]['display'])
|
||||
<h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
|
||||
<p>{{ $permission[$i]['note'] }}</p>
|
||||
|
||||
<!-- radio -->
|
||||
<div class="form-group" style="padding-left: 15px;">
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 1,
|
||||
(array_key_exists($permission_name, $groupPermissions) && $groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Grant</label>
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 0, (!array_key_exists($permission_name, $groupPermissions) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Deny</label>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
@endfor
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
@section('inputFields')
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}
|
||||
<i class='fa fa-asterisk'></i></label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
|
||||
@foreach ($permissions as $area => $permission)
|
||||
@for ($i = 0; $i < count($permission); $i++)
|
||||
<?php
|
||||
$permission_name = $permission[$i]['permission'];
|
||||
?>
|
||||
@if ($permission[$i]['display'])
|
||||
<h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
|
||||
<p>{{ $permission[$i]['note'] }}</p>
|
||||
|
||||
</form>
|
||||
<!-- radio -->
|
||||
<div class="form-group" style="padding-left: 15px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 1,
|
||||
(array_key_exists($permission_name, $groupPermissions) && $groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Grant
|
||||
</label>
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 0, (!array_key_exists($permission_name, $groupPermissions) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Deny
|
||||
</label>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
@endfor
|
||||
@endforeach
|
||||
@stop
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<table
|
||||
name="groups"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-toggle="table"
|
||||
data-url="{{ route('api.groups.list') }}"
|
||||
|
@ -45,48 +45,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ \App\Models\Setting::getSettings()->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
exportOptions: {
|
||||
fileName: 'groups-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'groups-export', 'search' => true])
|
||||
@stop
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
{{ trans('admin/hardware/form.cost') }}
|
||||
</label>
|
||||
<div class="input-group col-md-3">
|
||||
<span class="input-group-addon">{{ \App\Models\Setting::first()->default_currency }}</span>
|
||||
<span class="input-group-addon">{{ $snipeSettings->default_currency }}</span>
|
||||
<input type="text" class="form-control" placeholder="{{ trans('admin/hardware/form.cost') }}" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost') }}">
|
||||
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
|
|
@ -1,317 +1,143 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($asset->id)
|
||||
{{ trans('admin/hardware/form.update') }}
|
||||
@else
|
||||
{{ trans('admin/hardware/form.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/hardware/form.create'),
|
||||
'updateText' => trans('admin/hardware/form.update'),
|
||||
'helpTitle' => trans('admin/hardware/general.about_assets_title'),
|
||||
'helpText' => trans('admin/hardware/general.about_assets_text')
|
||||
])
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
|
||||
@section('content')
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.company')
|
||||
<!-- Asset Tag -->
|
||||
<div class="form-group {{ $errors->has('asset_tag') ? ' has-error' : '' }}">
|
||||
<label for="asset_tag" class="col-md-3 control-label">{{ trans('admin/hardware/form.tag') }}</label>
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_tag')) ? ' required' : '' }}">
|
||||
@if ($item->id)
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $item->asset_tag) }}" />
|
||||
@else
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
|
||||
@endif
|
||||
|
||||
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
@if ($asset->id)
|
||||
<form id="create-form" class="form-horizontal" method="post" action="{{ route('update/hardware',$asset->id) }}" autocomplete="off" role="form" enctype="multipart/form-data">
|
||||
@else
|
||||
<form id="create-form" class="form-horizontal" method="post" action="{{ route('savenew/hardware') }}" autocomplete="off" role="form" enctype="multipart/form-data">
|
||||
@endif
|
||||
<!-- Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.model') }}</label>
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-10{{ (\App\Helpers\Helper::checkIfRequired($item, 'model_id')) ? ' required' : '' }}">
|
||||
@if (isset($selected_model))
|
||||
{{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
|
||||
@else
|
||||
{{ Form::select('model_id', $model_list , Input::old('model_id', $item->model_id), array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
@endif
|
||||
|
||||
<!-- onclick="return dependency('model')" -->
|
||||
{!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
<div class="box box-default">
|
||||
@if ($asset->id)
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $asset->showAssetName() }}</h3>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<!-- Asset Tag -->
|
||||
<div class="form-group {{ $errors->has('asset_tag') ? ' has-error' : '' }}">
|
||||
<label for="asset_tag" class="col-md-3 control-label">{{ trans('admin/hardware/form.tag') }}</label>
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'asset_tag')) ? ' required' : '' }}">
|
||||
@if ($asset->id)
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $asset->asset_tag) }}" />
|
||||
@else
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
|
||||
@endif
|
||||
|
||||
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.model') }}</label>
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-10{{ (\App\Helpers\Helper::checkIfRequired($asset, 'model_id')) ? ' required' : '' }}">
|
||||
@if (isset($selected_model))
|
||||
{{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
|
||||
@else
|
||||
{{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
@endif
|
||||
|
||||
<!-- onclick="return dependency('model')" -->
|
||||
{!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id" class="btn btn-sm btn-default">New</a>
|
||||
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id='custom_fields_content'>
|
||||
<!-- Custom Fields -->
|
||||
@if ($asset->model && $asset->model->fieldset)
|
||||
<?php $model=$asset->model; ?>
|
||||
@endif
|
||||
@if (Input::old('model_id'))
|
||||
<?php $model=\App\Models\AssetModel::find(Input::old('model_id')); ?>
|
||||
@elseif (isset($selected_model))
|
||||
<?php $model=$selected_model; ?>
|
||||
@endif
|
||||
@if (isset($model) && $model)
|
||||
@include("models/custom_fields_form",["model" => $model])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
|
||||
<div class="col-md-7 col-sm-11{{ (\App\Helpers\Helper::checkIfRequired($asset, 'status_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id')) }}
|
||||
|
||||
|
||||
|
||||
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='statuslabel' data-select='status_select_id' class="btn btn-sm btn-default">New</a>
|
||||
<span class="status_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
|
||||
</div>
|
||||
<div class="col-md-7 col-sm-11 col-md-offset-3">
|
||||
<p class="help-block">{{ trans('admin/hardware/form.help_checkout') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!$asset->id)
|
||||
<!-- Assigned To -->
|
||||
<div id="assigned_user" style="display: none;" class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('assigned_to', $assigned_to , Input::old('assigned_to', $asset->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left" style="margin-left: -20px; padding-top: 3px">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<!-- Serial -->
|
||||
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
|
||||
<label for="serial" class="col-md-3 control-label">{{ trans('admin/hardware/form.serial') }} </label>
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'serial')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="serial" id="serial" value="{{ Input::old('serial', $asset->serial) }}" />
|
||||
{!! $errors->first('serial', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Asset Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::isCurrentUserAuthorized())
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 control-label">{{ Form::label('company_id', trans('general.company')) }}</div>
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($asset, 'company_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('company_id', $company_list , Input::old('company_id', $asset->company_id),
|
||||
['class'=>'select2', 'style'=>'width:100%']) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
<label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.date') }}</label>
|
||||
<div class="input-group col-md-3">
|
||||
<div class="input-group">
|
||||
|
||||
<input type="text" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $asset->purchase_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div><!-- /.input group -->
|
||||
|
||||
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Supplier -->
|
||||
<div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
|
||||
<label for="supplier_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.supplier') }}</label>
|
||||
<div class="col-md-7 col-sm-11">
|
||||
{{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id', $asset->supplier_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'supplier_select_id')) }}
|
||||
|
||||
{!! $errors->first('supplier_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
<label for="order_number" class="col-md-3 control-label">{{ trans('admin/hardware/form.order') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $asset->order_number) }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<label for="purchase_cost" class="col-md-3 control-label">{{ trans('admin/hardware/form.cost') }} </label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
@if (($asset->id) && ($asset->assetloc))
|
||||
{{ $asset->assetloc->currency }}
|
||||
@else
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
@endif
|
||||
|
||||
|
||||
</span>
|
||||
<input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)) }}" />
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Warranty -->
|
||||
<div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
|
||||
<label for="warranty_months" class="col-md-3 control-label">{{ trans('admin/hardware/form.warranty') }}</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="input-group col-md-3" style="padding-left: 0px;">
|
||||
<input class="form-control" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months', $asset->warranty_months) }}" />
|
||||
<span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
|
||||
</div>
|
||||
<div class="col-md-9" style="padding-left: 0px;">
|
||||
{!! $errors->first('warranty_months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
<textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $asset->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Default Location -->
|
||||
<div class="form-group {{ $errors->has('rtd_location_id') ? ' has-error' : '' }}">
|
||||
<label for="rtd_location_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.default_location') }}</label>
|
||||
<div class="col-md-7 col-sm-11">
|
||||
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $asset->rtd_location_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'rtd_location_select')) }}
|
||||
|
||||
{!! $errors->first('rtd_location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Requestable -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-10">
|
||||
<label>
|
||||
<input type="checkbox" value="1" name="requestable" id="requestable" class="minimal" {{ Input::old('requestable', $asset->requestable) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.requestable') }}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Image -->
|
||||
@if ($asset->image)
|
||||
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('image_delete'),array('class' => 'minimal') }}
|
||||
<img src="{{ config('app.url') }}/uploads/assets/{{ $asset->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
|
||||
<div class="col-md-5">
|
||||
<!-- {{ Form::file('image') }} -->
|
||||
<input type="file" id="file-upload" accept="image/*" name="image">
|
||||
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
<div class="box-footer text-right">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}" method="post" enctype="multipart/form-data">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id" class="btn btn-sm btn-default">New</a>
|
||||
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id='custom_fields_content'>
|
||||
<!-- Custom Fields -->
|
||||
@if ($item->model && $item->model->fieldset)
|
||||
<?php $model=$item->model; ?>
|
||||
@endif
|
||||
@if (Input::old('model_id'))
|
||||
<?php $model=\App\Models\AssetModel::find(Input::old('model_id')); ?>
|
||||
@elseif (isset($selected_model))
|
||||
<?php $model=$selected_model; ?>
|
||||
@endif
|
||||
@if (isset($model) && $model)
|
||||
@include("models/custom_fields_form",["model" => $model])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.status')
|
||||
|
||||
@if (!$item->id)
|
||||
<!-- Assigned To -->
|
||||
<div id="assigned_user" style="display: none;" class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('assigned_to', $assigned_to , Input::old('assigned_to', $item->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left" style="margin-left: -20px; padding-top: 3px">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include ('partials.forms.edit.serial', ['translated_serial' => trans('admin/hardware/form.serial')])
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')])
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.supplier')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
<?php
|
||||
$currency_type=null;
|
||||
if ($item->id && $item->assetloc) {
|
||||
$currency_type = $item->assetloc->currency;
|
||||
}
|
||||
?>
|
||||
@include ('partials.forms.edit.purchase_cost', ['currency_type' => $currency_type])
|
||||
@include ('partials.forms.edit.warranty')
|
||||
@include ('partials.forms.edit.notes')
|
||||
|
||||
<!-- Default Location -->
|
||||
<div class="form-group {{ $errors->has('rtd_location_id') ? ' has-error' : '' }}">
|
||||
<label for="rtd_location_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.default_location') }}</label>
|
||||
<div class="col-md-7 col-sm-11">
|
||||
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $item->rtd_location_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'rtd_location_select')) }}
|
||||
|
||||
{!! $errors->first('rtd_location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')])
|
||||
|
||||
<!-- Image -->
|
||||
@if ($item->image)
|
||||
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('image_delete'),array('class' => 'minimal') }}
|
||||
<img src="{{ config('app.url') }}/uploads/assets/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
|
||||
<div class="col-md-5">
|
||||
<!-- {{ Form::file('image') }} -->
|
||||
<input type="file" id="file-upload" accept="image/*" name="image">
|
||||
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include('partials/modals')
|
||||
@include('partials/modals')
|
||||
<script>
|
||||
|
||||
function fetchCustomFields() {
|
||||
|
@ -592,5 +418,4 @@ $(function () {
|
|||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@stop
|
||||
@stop
|
|
@ -63,7 +63,7 @@
|
|||
name="assets"
|
||||
{{-- data-row-style="rowStyle" --}}
|
||||
data-toolbar="#toolbar"
|
||||
class="table table-striped"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.hardware.list', array(''=>e(Input::get('status')),'order_number'=>e(Input::get('order_number')), 'status_id'=>e(Input::get('status_id'))))}}"
|
||||
data-cookie="true"
|
||||
|
@ -137,64 +137,11 @@
|
|||
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/multiple-sort/bootstrap-table-multiple-sort.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: 100,
|
||||
pagination: true,
|
||||
sidePagination: 'server',
|
||||
sortable: true,
|
||||
showMultiSort: true,
|
||||
cookie: true,
|
||||
cookieExpire: '2y',
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'excel', 'txt','json', 'xml'],
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200','500','1000'],
|
||||
exportOptions: {
|
||||
fileName: 'assets-export-' + (new Date()).toISOString().slice(0,10),
|
||||
},
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
sort: 'fa fa-sort-amount-desc',
|
||||
plus: 'fa fa-plus',
|
||||
minus: 'fa fa-minus',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
// $('#toolbar').find('select').change(function () {
|
||||
// $table.bootstrapTable('refreshOptions', {
|
||||
// exportDataType: $(this).val()
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
</script>
|
||||
@include ('partials.bootstrap-table', [
|
||||
'exportFile' => 'assets-export',
|
||||
'search' => true,
|
||||
'multiSort' => true
|
||||
])
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
|
|
@ -93,8 +93,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->custom_css)
|
||||
{{ \App\Models\Setting::getSettings()->show_custom_css() }}
|
||||
@if ($snipeSettings->custom_css)
|
||||
{{ $snipeSettings->show_custom_css() }}
|
||||
@endif
|
||||
|
||||
</style>
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<a href="{{ route('view/model', $asset->model->id) }}">
|
||||
{{ $asset->model->name }}
|
||||
</a>
|
||||
/ {{ $asset->model->modelno }}</div>
|
||||
/ {{ $asset->model->model_number }}</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->purchase_date)
|
||||
|
@ -90,7 +90,7 @@
|
|||
|
||||
@if ($asset->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.cost') }}:</strong>
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($asset->purchase_cost,2) }} </div>
|
||||
@endif
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
<tr>
|
||||
<td>{{ trans('admin/models/table.modelnumber') }}</td>
|
||||
<td>
|
||||
{{ $asset->model->modelno }}
|
||||
{{ $asset->model->model_number }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -201,7 +201,7 @@
|
|||
@elseif (($asset->id) && ($asset->assetloc))
|
||||
{{ $asset->assetloc->currency }}
|
||||
@else
|
||||
{{ \App\Models\Setting::first()->default_currency }}
|
||||
{{ $snipeSettings->default_currency }}
|
||||
@endif
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)}}
|
||||
|
||||
|
@ -360,7 +360,7 @@
|
|||
<img src="{{ config('app.url') }}/uploads/models/{{{ $asset->model->image }}}" class="assetimg img-responsive">
|
||||
@endif
|
||||
|
||||
@if (App\Models\Setting::getSettings()->qr_code=='1')
|
||||
@if ($snipeSettings->qr_code=='1')
|
||||
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
|
||||
@endif
|
||||
|
||||
|
@ -572,7 +572,7 @@
|
|||
<th class="col-md-2"><span class="line"></span>{{ trans('table.actions') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('general.user') }}</th>
|
||||
<th class="col-md-3"><span class="line"></span>{{ trans('general.notes') }}</th>
|
||||
@if (App\Models\Setting::getSettings()->require_accept_signature=='1')
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<th class="col-md-3"><span class="line"></span>{{ trans('general.signature') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
|
@ -626,7 +626,7 @@
|
|||
@if ($log->note) {{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
@if (App\Models\Setting::getSettings()->require_accept_signature=='1')
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<td>
|
||||
@if (($log->accept_signature!='') && (($log->action_type=='accepted') || ($log->action_type=='declined')))
|
||||
<a href="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" data-toggle="lightbox" data-type="image"><img src="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" class="img-responsive"></a>
|
||||
|
|
|
@ -34,21 +34,21 @@
|
|||
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
|
||||
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->header_color)
|
||||
@if ($snipeSettings->header_color)
|
||||
<style>
|
||||
.main-header .navbar, .main-header .logo {
|
||||
background-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
background: -webkit-linear-gradient(top, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
|
||||
background: linear-gradient(to bottom, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
|
||||
border-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
background-color: {{ $snipeSettings->header_color }};
|
||||
background: -webkit-linear-gradient(top, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
|
||||
background: linear-gradient(to bottom, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
|
||||
border-color: {{ $snipeSettings->header_color }};
|
||||
}
|
||||
.skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a {
|
||||
border-left-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
border-left-color: {{ $snipeSettings->header_color }};
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
border-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
background-color: {{ $snipeSettings->header_color }};
|
||||
border-color: {{ $snipeSettings->header_color }};
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -58,8 +58,8 @@
|
|||
|
||||
<body class="hold-transition login-page">
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->logo!='')
|
||||
<center><img class="logo" style="padding-top: 20px; padding-bottom: 10px;" src="{{ config('app.url') }}/uploads/{{ \App\Models\Setting::getSettings()->logo }}"></center>
|
||||
@if ($snipeSettings->logo!='')
|
||||
<center><img class="logo" style="padding-top: 20px; padding-bottom: 10px;" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}"></center>
|
||||
@endif
|
||||
<!-- Content -->
|
||||
@yield('content')
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@section('title')
|
||||
@show
|
||||
|
||||
:: {{ \App\Models\Setting::getSettings()->site_name }}
|
||||
:: {{ $snipeSettings->site_name }}
|
||||
</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
@ -35,26 +35,26 @@
|
|||
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
|
||||
|
||||
<style>
|
||||
@if (\App\Models\Setting::getSettings()->header_color)
|
||||
@if ($snipeSettings->header_color)
|
||||
.main-header .navbar, .main-header .logo {
|
||||
background-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
background: -webkit-linear-gradient(top, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
|
||||
background: linear-gradient(to bottom, {{ \App\Models\Setting::getSettings()->header_color }} 0%,{{ \App\Models\Setting::getSettings()->header_color }} 100%);
|
||||
border-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
background-color: {{ $snipeSettings->header_color }};
|
||||
background: -webkit-linear-gradient(top, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
|
||||
background: linear-gradient(to bottom, {{ $snipeSettings->header_color }} 0%,{{ $snipeSettings->header_color }} 100%);
|
||||
border-color: {{ $snipeSettings->header_color }};
|
||||
}
|
||||
.skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a {
|
||||
border-left-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
border-left-color: {{ $snipeSettings->header_color }};
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
border-color: {{ \App\Models\Setting::getSettings()->header_color }};
|
||||
background-color: {{ $snipeSettings->header_color }};
|
||||
border-color: {{ $snipeSettings->header_color }};
|
||||
}
|
||||
|
||||
@endif
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->custom_css)
|
||||
{{ \App\Models\Setting::getSettings()->show_custom_css() }}
|
||||
@if ($snipeSettings->custom_css)
|
||||
{{ $snipeSettings->show_custom_css() }}
|
||||
@endif
|
||||
@media (max-width: 400px) {
|
||||
.navbar-left {
|
||||
|
@ -70,7 +70,7 @@
|
|||
<script>
|
||||
window.snipeit = {
|
||||
settings: {
|
||||
"per_page": {{ \App\Models\Setting::getSettings()->per_page }}
|
||||
"per_page": {{ $snipeSettings->per_page }}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
|
||||
@if (\App\Models\Setting::getSettings()->load_remote=='1')
|
||||
@if ($snipeSettings->load_remote=='1')
|
||||
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
|
@ -106,18 +106,18 @@
|
|||
</a>
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li class="left-navblock">
|
||||
@if (\App\Models\Setting::getSettings()->brand == '3')
|
||||
@if ($snipeSettings->brand == '3')
|
||||
<a class="logo navbar-brand no-hover" href="{{ config('app.url') }}">
|
||||
<img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ \App\Models\Setting::getSettings()->logo }}">
|
||||
{{ \App\Models\Setting::getSettings()->site_name }}
|
||||
<img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
{{ $snipeSettings->site_name }}
|
||||
</a>
|
||||
@elseif (\App\Models\Setting::getSettings()->brand == '2')
|
||||
@elseif ($snipeSettings->brand == '2')
|
||||
<a class="logo navbar-brand no-hover" href="{{ config('app.url') }}">
|
||||
<img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ \App\Models\Setting::getSettings()->logo }}">
|
||||
<img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
</a>
|
||||
@else
|
||||
<a class="logo no-hover" href="{{ config('app.url') }}">
|
||||
{{ \App\Models\Setting::getSettings()->site_name }}
|
||||
{{ $snipeSettings->site_name }}
|
||||
</a>
|
||||
@endif
|
||||
</li>
|
||||
|
|
57
resources/views/layouts/edit-form.blade.php
Normal file
57
resources/views/layouts/edit-form.blade.php
Normal file
|
@ -0,0 +1,57 @@
|
|||
@extends('layouts.default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($item->id)
|
||||
{{ $updateText }}
|
||||
@else
|
||||
{{ $createText }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
@if ($item->id)
|
||||
{{ $item->display_name }}
|
||||
@endif
|
||||
</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="slideout-menu-toggle btn btn-box-tool btn-box-tool-lg" data-toggle="tooltip" title="Help"><i class="fa fa-question"></i></button>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<form id="create-form" class="form-horizontal" method="post" action="" autocomplete="off" role="form" enctype="multipart/form-data">
|
||||
<!-- CSRF Token -->
|
||||
{{ csrf_field() }}
|
||||
@yield('inputFields')
|
||||
@include('partials.forms.edit.submit')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slideout-menu">
|
||||
<a href="#" class="slideout-menu-toggle pull-right">×</a>
|
||||
<h3>
|
||||
{{ $helpTitle}}
|
||||
</h3>
|
||||
<p>{{ $helpText }} </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue