From 6367924b053325dda268a468165d165191ff24f4 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 20 Sep 2012 09:37:33 +0200 Subject: [PATCH] [gen] Added a i18n label used for the title of web pages and added a default favicon and the possibility to override it. --- gen/generator.py | 1 + gen/installer.py | 6 +++++- gen/po.py | 1 + gen/ui/appy.css | 3 +-- gen/ui/close.png | Bin 0 -> 226 bytes gen/ui/favicon.ico | Bin 0 -> 4286 bytes gen/ui/template.pt | 3 ++- 7 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 gen/ui/close.png create mode 100644 gen/ui/favicon.ico diff --git a/gen/generator.py b/gen/generator.py index ecd05fa..9520c8c 100644 --- a/gen/generator.py +++ b/gen/generator.py @@ -397,6 +397,7 @@ class ZopeGenerator(Generator): # Some global i18n messages poMsg = msg(app, '', app); poMsg.produceNiceDefault() self.labels += [poMsg, + msg('app_name', '', msg.APP_NAME), msg('workflow_state', '', msg.WORKFLOW_STATE), msg('appy_title', '', msg.APPY_TITLE), msg('data_change', '', msg.DATA_CHANGE), diff --git a/gen/installer.py b/gen/installer.py index 4527e8c..68f21d9 100644 --- a/gen/installer.py +++ b/gen/installer.py @@ -124,7 +124,11 @@ class ZopeInstaller: zopeName = name if hasattr(zopeFolder.aq_base, zopeName): continue f = file(j(root, name)) - if ext in gen.File.imageExts: + if zopeName == 'favicon.ico': + if not hasattr(self.app, zopeName): + # Copy it at the root. Else, IE won't notice it. + manage_addImage(self.app, zopeName, f) + elif ext in gen.File.imageExts: manage_addImage(zopeFolder, zopeName, f) elif ext == '.pt': manage_addPageTemplate(zopeFolder,zopeName,'',f.read()) diff --git a/gen/po.py b/gen/po.py index b3305a4..91fd74e 100644 --- a/gen/po.py +++ b/gen/po.py @@ -26,6 +26,7 @@ fallbacks = {'en': 'en-us en-ca', class PoMessage: '''Represents a i18n message (po format).''' CONFIG = "Configuration panel for product '%s'" + APP_NAME = "Appy" # The following messages (starting with MSG_) correspond to tool # attributes added for every gen-class (warning: the message IDs correspond # to MSG_). diff --git a/gen/ui/appy.css b/gen/ui/appy.css index 875c8b9..b445ee7 100644 --- a/gen/ui/appy.css +++ b/gen/ui/appy.css @@ -115,8 +115,7 @@ img { border: 0; vertical-align: middle} .objectTitle { font-size: 11pt; border-bottom: 3px solid grey; font-weight: bold;} .by { padding-top: 5px;} -.workflow { text-align: center; border-top: 1px solid grey; - background-color: #ececec } +.workflow { text-align: center; border-top: 1px solid grey } .underTitle { background-color: #e9e9e9 } .objectNavigate { margin-top: 3px;} .underline { border-bottom: 1px dotted grey;} diff --git a/gen/ui/close.png b/gen/ui/close.png new file mode 100644 index 0000000000000000000000000000000000000000..3eb5e55ba6a2fbc3f12d00633d742f6709e8dde5 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1|(OmDOUqhjKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=fm(z?n2}-D90{Nxdx@v7EBhTzVLn~i^=jWw0ELn~T^vIsE+_vf zu=sAzJh7p*5eV+52`MYK%J)C{o9^`NK@dywVbRaGeUe z1oW(7oNYg2!%o53lMO_aXLtBA3+tUvxZEHlb)$(dat>>}#A0TKgetpeuE4)ffwnPt My85}Sb4q9e09zAD^8f$< literal 0 HcmV?d00001 diff --git a/gen/ui/favicon.ico b/gen/ui/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d3eddebf503f57347445db93ac27e6f55390481f GIT binary patch literal 4286 zcmb7H3piB!7N2w7d(LrAok+@LdyC4OlSgR=dF9a{TV5HBWKiP~gM{Q+BCj|}9yN-s zm(&rZCOY(#6V)LV?au{UL;Clue;28k&OR)TG4Z>h-+aX8=7Gmgeb{kl^gjW*gu(HVU|&-W*(4cMiU6nKW)~E$?S%rxfAtuA1ZNsZ_asy%Iqg zV4aMQ*KW+qTXw6c$fRfIPMrr3v(V8|uE^CD^V`1NM6anSSc=M%is9qOQHiFe2+8Q^ z<#dQ!+tgIf!P!|OX!~|%W?`Y-!O~LO>dZ`IA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#M{xE`#;+glOdv%e0X z@;e=a7Q?u#+SF}!EOrILt7oAa7R`>r2MNTW%7(dJA^2$@Jin1nKf2#xlG!vTbb i#}I0LgHQ@wr}QU%GA7FCXQI7ek6!~Cg(w1>0{agaNTp){ literal 0 HcmV?d00001 diff --git a/gen/ui/template.pt b/gen/ui/template.pt index da3ab80..86a6235 100644 --- a/gen/ui/template.pt +++ b/gen/ui/template.pt @@ -19,7 +19,8 @@ tal:attributes="dir python: tool.getLanguageDirection(lang)"> - + +