• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

allura


Commit MetaInfo

修訂ffc2e4f149028ffa87a078d64b19e678209feb1b (tree)
時間2012-04-03 21:04:22
作者bolkimen <bolkimen@yaho...>
Commiterbolkimen

Log Message

ticket:36 add more columns values

Change Summary

差異

--- a/Allura/allura/lib/widgets/project_list.py
+++ b/Allura/allura/lib/widgets/project_list.py
@@ -32,6 +32,9 @@ class ProjectSummary(ew_core.Widget):
3232 if response['accolades'] is None:
3333 response['accolades'] = value.accolades
3434
35+ if type(response['columns']) == unicode:
36+ response['columns'] = int(response['columns'])
37+
3538 true_list = ['true', 't', '1', 'yes', 'y']
3639 if type(response['show_proj_icon']) == unicode:
3740 if response['show_proj_icon'].lower() in true_list:
@@ -76,7 +79,10 @@ class ProjectList(ew_core.Widget):
7679 display_mode='list',
7780 sitemaps=None,
7881 icon_urls=None,
79- accolades_index=None)
82+ accolades_index=None,
83+ columns=3,
84+ show_proj_icon=True,
85+ show_download_button=True)
8086
8187 def prepare_context(self, context):
8288 response = super(ProjectList, self).prepare_context(context)
@@ -90,6 +96,22 @@ class ProjectList(ew_core.Widget):
9096 response['icon_urls'] = M.Project.icon_urls(projects)
9197 if response['accolades_index'] is None:
9298 response['accolades_index'] = M.Project.accolades_index(projects)
99+
100+ if type(response['columns']) == unicode:
101+ response['columns'] = int(response['columns'])
102+
103+ true_list = ['true', 't', '1', 'yes', 'y']
104+ if type(response['show_proj_icon']) == unicode:
105+ if response['show_proj_icon'].lower() in true_list:
106+ response['show_proj_icon'] = True
107+ else:
108+ response['show_proj_icon'] = False
109+ if type(response['show_download_button']) == unicode:
110+ if response['show_download_button'].lower() in true_list:
111+ response['show_download_button'] = True
112+ else:
113+ response['show_download_button'] = False
114+
93115 return response
94116
95117 def resources(self):
--- a/Allura/allura/templates/widgets/project_summary.html
+++ b/Allura/allura/templates/widgets/project_summary.html
@@ -1,5 +1,5 @@
11 {% if display_mode == 'list' %}
2-<div class="list card"{% if columns == '2' %} style="width: 330px"{% endif %}>
2+<div class="list card"{% if columns == 2 %} style="width: 330px"{% elif columns == 1 %} style="width: 660px"{% endif %}>
33 {% if show_proj_icon == True %}
44 {% if accolades %}
55 <div class="box notch sponsor">