Browse Source

allow to personalize the home page

Damien ACCORSI 10 years ago
parent
commit
826e3f8199
3 changed files with 25 additions and 8 deletions
  1. 7 1
      tracim/development.ini.base
  2. 5 0
      tracim/tracim/config/app_cfg.py
  3. 13 7
      tracim/tracim/templates/index.mak

+ 7 - 1
tracim/development.ini.base View File

@@ -115,8 +115,14 @@ resetpassword.smtp_login = smtp.login
115 115
 resetpassword.smtp_passwd = smtp.password
116 116
 
117 117
 
118
-website.title = TRACIM - BOB
118
+# The following parameters allow to personalize the home page
119
+# They are html ready (you can put html tags they will be interpreted)
120
+website.title = TRACIM
119 121
 website.title.color = #555
122
+website.home.subtitle = Default login: admin@admin.admin (password: admin@admin.admin)
123
+website.home.tag_line = <div class="text-center" style="font-weight: bold;">Collaboration, versionning and traceability</div>
124
+website.home.below_login_form = in case of problem, please contact the administrator.
125
+
120 126
 # The following base_url is used for links and icons
121 127
 # integrated in the email notifcations
122 128
 website.base_url = http://127.0.0.1:8080

+ 5 - 0
tracim/tracim/config/app_cfg.py View File

@@ -183,6 +183,11 @@ class CFG(object):
183 183
         self.WEBSITE_HOME_BACKGROUND_IMAGE_URL = tg.lurl('/assets/img/bg.jpg')
184 184
         self.WEBSITE_BASE_URL = tg.config.get('website.base_url')
185 185
 
186
+        self.WEBSITE_HOME_TAG_LINE = tg.config.get('website.home.tag_line')
187
+        self.WEBSITE_SUBTITLE = tg.config.get('website.home.subtitle')
188
+        self.WEBSITE_HOME_BELOW_LOGIN_FORM = tg.config.get('website.home.below_login_form')
189
+
190
+
186 191
         self.EMAIL_NOTIFICATION_FROM = tg.config.get('email.notification.from')
187 192
         self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_HTML = tg.config.get('email.notification.content_update.template.html')
188 193
         self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_TEXT = tg.config.get('email.notification.content_update.template.text')

+ 13 - 7
tracim/tracim/templates/index.mak View File

@@ -10,8 +10,9 @@
10 10
     <div class="row-fluid">
11 11
         <div>
12 12
             <div class="row">
13
-                <div class="col-sm-offset-3 col-sm-5">
14
-                    <h1 class="text-center" style="color: ${h.CFG.WEBSITE_HOME_TITLE_COLOR};"><b>${h.CFG.WEBSITE_TITLE}</b></h1>
13
+                <div class="col-sm-offset-3 col-sm-6">
14
+                    <h1 class="text-center" style="color: ${h.CFG.WEBSITE_HOME_TITLE_COLOR};"><b>${h.CFG.WEBSITE_TITLE|n}</b></h1>
15
+                    <p class="text-center" style="color: ${h.CFG.WEBSITE_HOME_TITLE_COLOR};">${h.CFG.WEBSITE_SUBTITLE|n}</p>
15 16
                 </div>
16 17
             </div>
17 18
             <div class="row">
@@ -19,8 +20,11 @@
19 20
                     <a class="thumbnail">
20 21
                         <img src="${h.CFG.WEBSITE_HOME_IMAGE_URL}" alt="">
21 22
                     </a>
23
+                    <p>${h.CFG.WEBSITE_HOME_TAG_LINE|n}</p>
24
+                    
25
+
22 26
                 </div>
23
-                <div class="col-sm-3">
27
+                <div class="col-sm-4">
24 28
                     <div class="well">
25 29
                         <h2 style="margin-top: 0;">${TIM.ICO(32, 'status/status-locked')} ${_('Login')}</h2>
26 30
                         <form role="form" method="POST" action="${tg.url('/login_handler', params=dict(came_from=came_from, __logins=login_counter))}">
@@ -42,18 +46,20 @@
42 46
                                 </label>
43 47
                             </div>
44 48
                             <div class="text-right">
45
-                                <button type="submit" class="btn btn-small btn-success">
49
+                                <button type="submit" class="btn btn-small btn-success text-right">
46 50
                                     <i class="fa fa-check"></i> ${_('Login')}
47 51
                                 </button>
52
+                                <div class="pull-left">
53
+                                    <a class="btn btn-link" href="${tg.url('/reset_password')}"><i class="fa fa-magic"></i> ${_('Forgot password?')}</a>
54
+                                </div>
55
+
48 56
                             </div>
49 57
                         </form>
50 58
                     </div>
51 59
                 </div>
52 60
             </div>
53 61
             <div class="row">
54
-                <div class="col-sm-offset-5 col-sm-3" style="margin-top: -1.5em;">
55
-                    <a class="btn btn-link" href="${tg.url('/reset_password')}"><i class="fa fa-magic"></i> ${_('Forgot password?')}</a>
56
-                </div>
62
+                <div class="col-sm-offset-3 col-sm-6 text-center">${h.CFG.WEBSITE_HOME_BELOW_LOGIN_FORM|n}</div>
57 63
             </div>
58 64
 
59 65
         </div>