From 754ae4be5e9bfeca2123b2a79e308ca217ddc4b4 Mon Sep 17 00:00:00 2001
From: Alexander Lutay
Date: Fri, 19 Feb 2021 19:30:34 +0100
Subject: [PATCH] TT#103252 Fix 'Panel Branding': codestyle, layout,
localization
* Keep all buttons in the same "line".
* Add localization for all strings on the page.
* Align the code accordingly to the Sipwise code style.
Change-Id: I60df82b0a9f75b353ccf30d9ad5a7a94d05f46f4
---
share/templates/reseller/branding.tt | 68 ++++++++++++----------------
1 file changed, 30 insertions(+), 38 deletions(-)
diff --git a/share/templates/reseller/branding.tt b/share/templates/reseller/branding.tt
index 14cfd8db09..34de5647cd 100644
--- a/share/templates/reseller/branding.tt
+++ b/share/templates/reseller/branding.tt
@@ -1,14 +1,18 @@
[% site_config.title = c.loc('Panel Branding') -%]
-
-[% back_created = 1 -%]
-
+
+ [% c.loc('Back') %]
+ [% back_created = 1 -%]
+ [% UNLESS c.user.read_only -%]
+ [% c.loc('Edit Branding') %]
+ [% IF branding.logo -%]
+ [% c.loc('Delete Logo') %]
+ [% END -%]
+ [% END -%]
+
+
[% FOREACH m IN messages -%]
[% m.text %]
@@ -16,47 +20,35 @@
[% IF reseller.first.status != "active" -%]
[% c.loc('Reseller is [_1]', reseller.first.status) %]
[% END -%]
-[% messages = [] -%]
+ [% messages = [] -%]
-
- [% UNLESS c.user.read_only -%]
-
- Edit Branding
- [% IF branding.logo -%]
- Delete Logo
- [% END -%]
-
-
- [% END -%]
-
- [% IF branding.defined -%]
- [% IF branding.logo.defined -%]
- Custom Logo
-
-
- [% c.loc("You can use the logo by adding the following CSS to the Custom CSS below:") %]
+[% IF branding.defined -%]
+ [% IF branding.logo.defined -%]
+
[% c.loc('Custom Logo') %]
+
+
+ [% c.loc("You can use the logo by adding the following CSS to the Custom CSS below:") %]
#header .brand {
background: url([% c.uri_for_action('/reseller/get_branding_logo', c.req.captures) %]) no-repeat 0 0;
background-size: 280px 32px;
}
-
- [% ELSE -%]
- No logo uploaded.
- [% END -%]
-
+
+ [% ELSE -%]
+ [% c.loc('No logo uploaded') %]
+ [% END -%]
- Custom CSS
-
-
+ [% c.loc('Custom CSS') %]
+
+
[% branding.css %]
-
-
- [% ELSE -%]
- No branding specified, using standard branding.
- [% END -%]
+
+
+[% ELSE -%]
+ [% c.loc('No branding specified, using standard branding.') %]
+[% END -%]
[% IF branding_edit_flag == 1 -%]
[%