• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂6650c1def7fb7b4d731a0bee3da76db3907f076c (tree)
時間2012-04-17 01:23:24
作者bolkimen <bolkimen@yaho...>
CommiterDave Brondsema

Log Message

ticket:13 add column option and hide icon option

Change Summary

差異

--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -134,7 +134,8 @@ def project_blog_posts(max_number=5, sort='timestamp', summary=False, mount_poin
134134
135135 @macro('neighborhood-wiki')
136136 def projects(category=None, display_mode='grid', sort='last_updated',
137- show_total=False, limit=100, labels='', award='', private=False):
137+ show_total=False, limit=100, labels='', award='', private=False,
138+ columns=3, skip_proj_icon='off'):
138139 from allura.lib.widgets.project_list import ProjectList
139140 from allura.lib import utils
140141 from allura import model as M
@@ -208,7 +209,8 @@ def projects(category=None, display_mode='grid', sort='last_updated',
208209
209210 pl = ProjectList()
210211 g.resource_manager.register(pl)
211- response = pl.display(projects=projects, display_mode=display_mode)
212+ response = pl.display(projects=projects, display_mode=display_mode,
213+ columns=columns, skip_proj_icon=skip_proj_icon)
212214 if show_total:
213215 if total is None:
214216 total = 0
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -2266,7 +2266,6 @@ div.attachment_thumb .file_type span {
22662266 box-shadow: rgba(0, 0, 0, 0.4) 0 1px 5px 0;
22672267 background-color: #f5f5f5;
22682268 border: 1px solid #cccccc;
2269- width: 220px;
22702269 display: inline;
22712270 float: left;
22722271 overflow: hidden;
@@ -2283,6 +2282,9 @@ div.attachment_thumb .file_type span {
22832282 background-image: -moz-linear-gradient(100% 100% 90deg, #e5e5e5, white, white 25%);
22842283 margin: 0 0 10px 10px;
22852284 }
2285+.twocol { width: 330px; }
2286+.threecol { width: 220px; }
2287+
22862288 .card .box {
22872289 border: none;
22882290 -moz-border-radius: 8px;
--- a/Allura/allura/templates/widgets/project_list_widget.html
+++ b/Allura/allura/templates/widgets/project_list_widget.html
@@ -12,7 +12,9 @@
1212 icon_url=icon_urls[project._id],
1313 accolades=accolades_index[project._id],
1414 sitemap=sitemaps[project._id],
15- display_mode=display_mode)}}
15+ display_mode=display_mode,
16+ columns=columns,
17+ skip_proj_icon=skip_proj_icon)}}
1618 {% endif %}
1719 {% endfor %}
1820 {% do g.set_project(old_project) %}
--- a/Allura/allura/templates/widgets/project_summary.html
+++ b/Allura/allura/templates/widgets/project_summary.html
@@ -1,30 +1,34 @@
11 {% if display_mode == 'list' %}
2-<div class="list card">
3- {% if accolades %}
2+<div class="list card {% if columns == '2' %}twocol{% else %}threecol{% endif %}">
3+ {% if skip_proj_icon == 'off' %}
4+ {% if accolades %}
45 <div class="box notch sponsor">
56 <div class="feature">{{accolades[0].award.short}}</div>
67 <img src="{{icon_url}}" alt="{{value.name}} Logo"/>
78 </div>
8- {% else %}
9+ {% else %}
910 <div class="box">
1011 <img src="{{icon_url}}" alt="{{value.name}} Logo"/>
1112 </div>
13+ {% endif %}
1214 {% endif %}
13- <h2><a href="{{value.url()}}">{{value.name}}</a></h2>
15+ <h2><a href="{{value.url()}}">{{value.name}}{{ skip_proj_icon }}</a></h2>
1416 <p class="desc">{% if value.summary %}{{value.summary}}{% else %}{{h.text.truncate(value.short_description, 50)}}{% endif %}</p>
1517 {{g.markdown_wiki.convert('[[download_button]]')}}
1618 </div>
1719 {% else %}
1820 <div class="border card">
19- {% if accolades %}
21+ {% if skip_proj_icon == 'off' %}
22+ {% if accolades %}
2023 <div class="box notch sponsor">
2124 <div class="feature">{{accolades[0].award.short}}</div>
2225 <img src="{{icon_url}}" alt="{{value.name}} Logo"/>
2326 </div>
24- {% else %}
27+ {% else %}
2528 <div class="box">
2629 <img src="{{icon_url}}" alt="{{value.name}} Logo"/>
2730 </div>
31+ {% endif %}
2832 {% endif %}
2933 <h2><a href="{{value.url()}}">{{value.name}}</a></h2>
3034 <p class="desc">{% if value.summary %}{{value.summary}}{% else %}{{h.text.truncate(value.short_description, 50)}}{% endif %}</p>
@@ -34,4 +38,4 @@
3438 {% endfor %}
3539 </div>
3640 </div>
37-{% endif %}
\ No newline at end of file
41+{% endif %}