mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Merge pull request #13556 from snipe/feature/sc-23684
Added model name and number to dynamic url
This commit is contained in:
commit
f08cef8664
|
@ -548,8 +548,10 @@ class AssetPresenter extends Presenter
|
|||
public function dynamicWarrantyUrl()
|
||||
{
|
||||
$warranty_lookup_url = $this->model->model->manufacturer->warranty_lookup_url;
|
||||
$url = (str_replace('{LOCALE}',\App\Models\Setting::getSettings()->locale,$warranty_lookup_url));
|
||||
$url = (str_replace('{SERIAL}',$this->model->serial,$url));
|
||||
$url = (str_replace('{LOCALE}',\App\Models\Setting::getSettings()->locale, $warranty_lookup_url));
|
||||
$url = (str_replace('{SERIAL}', urlencode($this->model->serial), $url));
|
||||
$url = (str_replace('{MODEL_NAME}', urlencode($this->model->model->name), $url));
|
||||
$url = (str_replace('{MODEL_NUMBER}', urlencode($this->model->model->model_number), $url));
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
return array(
|
||||
|
||||
'support_url_help' => 'Use <code>{LOCALE}</code> and <code>{SERIAL}</code> in your URL as variables to have those values auto-populate when viewing assets.',
|
||||
'support_url_help' => 'Variables <code>{LOCALE}</code>, <code>{SERIAL}</code>, <code>{MODEL_NUMBER}</code>, and <code>{MODEL_NAME}</code> may be used in your URL to have those values auto-populate when viewing assets - for example https://support.apple.com/{LOCALE}/{SERIAL}.',
|
||||
'does_not_exist' => 'Manufacturer does not exist.',
|
||||
'assoc_users' => 'This manufacturer is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this manufacturer and try again. ',
|
||||
|
||||
|
|
Loading…
Reference in a new issue