mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-02 21:30:16 +09:00
Add Custom Favicon (#674)
* Add Custom Favicon * Foss Update add Favicon * foss update
This commit is contained in:
1 parent
9d68b989b1
commit
cca1d12e03
9 files changed
+34
-9
No files matched your search
+12
-1
@@ -22,6 +22,17 @@
|
||||
/**
|
||||
* Migration steps from BoxBilling to FOSSBilling.
|
||||
*/
|
||||
class FOSSPatch_26 extends FOSSPatchAbstract
|
||||
{
|
||||
public function patch()
|
||||
{
|
||||
//Added favicon settings
|
||||
$q= "INSERT INTO setting ('id', 'param', 'value', 'public', 'category', 'hash', 'created_at', 'updated_at') VALUES (29,'company_favicon','themes/huraga/assets/favicon.ico',0,NULL,NULL,'2023-01-08 12:00:00','2023-01-08 12:00:00');";
|
||||
$this->execSql($q);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class FOSSPatch_25 extends FOSSPatchAbstract
|
||||
{
|
||||
public function patch()
|
||||
@@ -134,4 +145,4 @@ foreach ($patches as $class) {
|
||||
}
|
||||
error_log('FOSSBilling update completed');
|
||||
|
||||
echo 'Update completed. You are using FOSSBilling ' . Box_Version::VERSION . PHP_EOL;
|
||||
echo 'Update completed. You are using FOSSBilling ' . Box_Version::VERSION . PHP_EOL;
|
||||
@@ -343,7 +343,8 @@ VALUES
|
||||
(25,'nameserver_3',NULL,0,NULL,NULL,'2022-12-01 12:00:00','2022-12-01 12:00:00'),
|
||||
(26,'nameserver_4',NULL,0,NULL,NULL,'2022-12-01 12:00:00','2022-12-01 12:00:00'),
|
||||
(27,'funds_min_amount','10',0,NULL,NULL,'2022-12-01 12:00:00','2022-12-01 12:00:00'),
|
||||
(28,'funds_max_amount','200',0,NULL,NULL,'2022-12-01 12:00:00','2022-12-01 12:00:00');
|
||||
(28,'funds_max_amount','200',0,NULL,NULL,'2022-12-01 12:00:00','2022-12-01 12:00:00'),
|
||||
(29,'company_favicon','themes/huraga/assets/favicon.ico',0,NULL,NULL,'2023-01-08 12:00:00','2023-01-08 12:00:00');
|
||||
|
||||
/*!40000 ALTER TABLE `setting` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
@@ -476,4 +477,4 @@ UNLOCK TABLES;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
@@ -9,7 +9,7 @@
|
||||
<link rel='stylesheet' type='text/css' href="{{ ('css/bootstrap.css') | asset_url }}" media="screen">
|
||||
<link rel='stylesheet' type='text/css' href="{{ ('css/bootstrap.css') | asset_url }}" media="print">
|
||||
|
||||
<link rel="shortcut icon" href="{{ 'favicon.ico' | asset_url }}">
|
||||
<link rel="shortcut icon" href="{{ guest.system_company.favicon_url }}">
|
||||
|
||||
<style>
|
||||
@media print {
|
||||
|
||||
@@ -144,6 +144,7 @@ class Service
|
||||
'company_signature',
|
||||
'company_logo',
|
||||
'company_logo_dark',
|
||||
'company_favicon',
|
||||
'company_address_1',
|
||||
'company_address_2',
|
||||
'company_address_3',
|
||||
@@ -169,6 +170,11 @@ class Service
|
||||
}
|
||||
$logoUrlDark = (null === $logoUrlDark) ? $logoUrl : $logoUrlDark;
|
||||
|
||||
$faviconUrl = $this->di['array_get']($results, 'company_favicon', null);
|
||||
if (null !== $faviconUrl && false === strpos($faviconUrl, 'http')) {
|
||||
$faviconUrl = $baseUrl . $faviconUrl;
|
||||
}
|
||||
|
||||
return [
|
||||
'www' => $baseUrl,
|
||||
'name' => $this->di['array_get']($results, 'company_name', null),
|
||||
@@ -177,6 +183,7 @@ class Service
|
||||
'signature' => $this->di['array_get']($results, 'company_signature', null),
|
||||
'logo_url' => $logoUrl,
|
||||
'logo_url_dark' => $logoUrlDark,
|
||||
'favicon_url' => $faviconUrl,
|
||||
'address_1' => $this->di['array_get']($results, 'company_address_1', null),
|
||||
'address_2' => $this->di['array_get']($results, 'company_address_2', null),
|
||||
'address_3' => $this->di['array_get']($results, 'company_address_3', null),
|
||||
|
||||
@@ -87,6 +87,12 @@
|
||||
<input class="form-control" type="text" name="company_logo_dark" value="{{ params.company_logo_dark }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">{{ 'Favicon'|trans }}</label>
|
||||
<div class="col">
|
||||
<input class="form-control" type="text" name="company_favicon" value="{{ params.company_favicon }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3 row">
|
||||
<label class="form-label col-3 col-form-label">{{ 'Company number, chamber of commerce number'|trans }}</label>
|
||||
<div class="col">
|
||||
@@ -482,7 +488,7 @@ ZW=Zimbabwe
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="{{ CSRFToken }}">
|
||||
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link rel="shortcut icon" href="{{ company.favicon_url }}">
|
||||
|
||||
{% include 'partial_bb_meta.html.twig' %}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="{{ CSRFToken }}">
|
||||
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link rel="shortcut icon" href="{{ company.favicon_url }}">
|
||||
|
||||
{% include "partial_bb_meta.html.twig" %}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<link rel='stylesheet' type='text/css' href="{{ 'css/logos.css' | asset_url }}">
|
||||
<link rel='stylesheet' type='text/css' href="{{ 'css/flags16.css' | asset_url }}">
|
||||
|
||||
<link rel="shortcut icon" href="{{ 'favicon.ico' | asset_url }}">
|
||||
<link rel="shortcut icon" href="{{ guest.system_company.favicon_url }}">
|
||||
|
||||
<script src="{{ "Api/API.js?v=#{guest.system_version}" | library_url }}"></script>
|
||||
<script src="{{ 'js/libs/jquery.js' | asset_url }}"></script>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<link rel='stylesheet' type='text/css' href="{{ 'css/font-awesome.css' | asset_url }}">
|
||||
<link rel='stylesheet' type='text/css' href="{{ 'css/plugins/jquery.jgrowl.css' | asset_url }}">
|
||||
|
||||
<link rel="shortcut icon" href="{{ 'favicon.ico' | asset_url }}">
|
||||
<link rel="shortcut icon" href="{{ guest.system_company.favicon_url }}">
|
||||
|
||||
<script src="{{ "Api/API.js?v=#{guest.system_version}" | library_url }}"></script>
|
||||
<script src="{{ 'js/libs/jquery.js' | asset_url }}"></script>
|
||||
|
||||
Reference in new issue
Block a user