瀏覽代碼

allow to personalize the home page

Damien ACCORSI 10 年之前
父節點
當前提交
826e3f8199
共有 3 個文件被更改,包括 25 次插入8 次删除
  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 查看文件

115
 resetpassword.smtp_passwd = smtp.password
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
 website.title.color = #555
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
 # The following base_url is used for links and icons
126
 # The following base_url is used for links and icons
121
 # integrated in the email notifcations
127
 # integrated in the email notifcations
122
 website.base_url = http://127.0.0.1:8080
128
 website.base_url = http://127.0.0.1:8080

+ 5 - 0
tracim/tracim/config/app_cfg.py 查看文件

183
         self.WEBSITE_HOME_BACKGROUND_IMAGE_URL = tg.lurl('/assets/img/bg.jpg')
183
         self.WEBSITE_HOME_BACKGROUND_IMAGE_URL = tg.lurl('/assets/img/bg.jpg')
184
         self.WEBSITE_BASE_URL = tg.config.get('website.base_url')
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
         self.EMAIL_NOTIFICATION_FROM = tg.config.get('email.notification.from')
191
         self.EMAIL_NOTIFICATION_FROM = tg.config.get('email.notification.from')
187
         self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_HTML = tg.config.get('email.notification.content_update.template.html')
192
         self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_HTML = tg.config.get('email.notification.content_update.template.html')
188
         self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_TEXT = tg.config.get('email.notification.content_update.template.text')
193
         self.EMAIL_NOTIFICATION_CONTENT_UPDATE_TEMPLATE_TEXT = tg.config.get('email.notification.content_update.template.text')

+ 13 - 7
tracim/tracim/templates/index.mak 查看文件

10
     <div class="row-fluid">
10
     <div class="row-fluid">
11
         <div>
11
         <div>
12
             <div class="row">
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
                 </div>
16
                 </div>
16
             </div>
17
             </div>
17
             <div class="row">
18
             <div class="row">
19
                     <a class="thumbnail">
20
                     <a class="thumbnail">
20
                         <img src="${h.CFG.WEBSITE_HOME_IMAGE_URL}" alt="">
21
                         <img src="${h.CFG.WEBSITE_HOME_IMAGE_URL}" alt="">
21
                     </a>
22
                     </a>
23
+                    <p>${h.CFG.WEBSITE_HOME_TAG_LINE|n}</p>
24
+                    
25
+
22
                 </div>
26
                 </div>
23
-                <div class="col-sm-3">
27
+                <div class="col-sm-4">
24
                     <div class="well">
28
                     <div class="well">
25
                         <h2 style="margin-top: 0;">${TIM.ICO(32, 'status/status-locked')} ${_('Login')}</h2>
29
                         <h2 style="margin-top: 0;">${TIM.ICO(32, 'status/status-locked')} ${_('Login')}</h2>
26
                         <form role="form" method="POST" action="${tg.url('/login_handler', params=dict(came_from=came_from, __logins=login_counter))}">
30
                         <form role="form" method="POST" action="${tg.url('/login_handler', params=dict(came_from=came_from, __logins=login_counter))}">
42
                                 </label>
46
                                 </label>
43
                             </div>
47
                             </div>
44
                             <div class="text-right">
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
                                     <i class="fa fa-check"></i> ${_('Login')}
50
                                     <i class="fa fa-check"></i> ${_('Login')}
47
                                 </button>
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
                             </div>
56
                             </div>
49
                         </form>
57
                         </form>
50
                     </div>
58
                     </div>
51
                 </div>
59
                 </div>
52
             </div>
60
             </div>
53
             <div class="row">
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
             </div>
63
             </div>
58
 
64
 
59
         </div>
65
         </div>