Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit deafb52622743fbac68ec09e23f88d1fe00994c2

various UI improvements for 0.2
app/app.py
(106 / 47)
  
1818import sys
1919import signal
2020from math import ceil
21from string import join
21from string import join,split
2222
2323#import fakeserver # fake SN API
2424import sugar_network as client
3939
4040server_pid = None
4141Contexts = client.Context.find(reply=['guid', 'title', 'vote'])
42Questions = client.Question.find(reply=['guid', 'title', 'content', 'context'])
43Problems = client.Problem.find(reply=['guid', 'title', 'content', 'context'])
44Ideas = client.Idea.find(reply=['guid', 'title', 'content', 'context'])
4245
4346def get_colors():
4447 client = gconf.client_get_default()
6767@app.route('/launch/<context_guid>')
6868def launch(context_guid):
6969 client.launch(context_guid)
70 return resource_browser(context_guid)
70 return redirect(url_for('resource_browser',
71 context_guid=context_guid, page=1))
7172
7273@app.route('/new/resource')
7374@app.route('/new/resource/<context_guid>')
119119
120120@app.route('/_stars/<context>')
121121def stars(context=None):
122 vote = request.args.get('vote', None)
123 if context and vote:
122 keep = request.args.get('keep', None)
123 if context and keep:
124124 context = context[5:] #remove "stars-" from id
125125 c = client.Context(context)
126 c['vote'] = vote == 'true'
126 c['keep'] = keep == 'true'
127127 c.post()
128 return jsonify(vote=vote)
128 return jsonify(keep=keep)
129129
130@app.route('/_moon/<context>')
131def moon(context=None):
132 keep_impl = request.args.get('keep_impl', None)
133 if context and keep_impl:
134 context = context[5:] #remove "moon-" from id
135 c = client.Context(context)
136 c['keep_implementation'] = keep_impl == 'true'
137 c.post()
138 return jsonify(keep=keep_impl)
139
130140@app.route('/resource/search/')
131141@app.route('/resource/search/<query>')
132142@app.route('/resource')
161161 return render_template('users-grid.html',query=query,
162162 result=result, type='user')
163163
164def paginate(resource, full_query, _PAGE_SIZE=6, page=1, context=None):
165 r = []
166
167 resource.filter(full_query, context=context)
168 result=resource
169
170 offset = _PAGE_SIZE * (page - 1)
171 if offset>result.total:
172 raise KeyError
173
174 for i in range(offset, offset + _PAGE_SIZE):
175 try:
176 r.append(result[i])
177 except KeyError:
178 pass
179
180 total_pages = int(ceil(result.total / float(_PAGE_SIZE)))
181
182 if total_pages==0:
183 info = _(u'zero results')
184 else:
185 info = _(u'page %(page)s of %(total)s', page=page, total=total_pages)
186 if page > total_pages and total_pages > 0:
187 abort(404)
188
189 return r, total_pages, result.total, info
190
164191@app.route('/context/search/')
165192@app.route('/context/search/<query>')
166193@app.route('/context')
210210 if query:
211211 terms.append(query)
212212
213 if session.get('favorites-filter'):
214 terms.append('vote=True')
215
216213 full_query = join(terms, " AND ")
217214
218 _PAGE_SIZE = 6
219 r = []
215 try:
216 r, total_pages, total, info = paginate(Contexts, full_query, page=page)
217 except KeyError:
218 return redirect(url_for('context_grid',
219 query=query, page=1))
220220
221 Contexts.filter(full_query)#, reply=['guid', 'title', 'vote'])
222 result=Contexts
223
224 offset = _PAGE_SIZE * (page - 1)
225 if offset>result.total:
226 offset=0
227 page=1
228
229 for i in range(offset, offset + _PAGE_SIZE):
230 try:
231 r.append(result[i])
232 except KeyError:
233 pass
234
235 total_pages = int(ceil(result.total / float(_PAGE_SIZE)))
236
237 if total_pages==0:
238 info = _(u'zero results')
239 else:
240 info = _(u'page %(page)s of %(total)s', page=page, total=total_pages)
241 if page > total_pages and total_pages > 0:
242 abort(404)
243
221 meta = _("browsing %(total)s contexts", total=total)
244222 stroke, fill = get_colors()
245223 if '_pjax' in request.args:
246224 template='resource-grid.html'
247225 else:
248226 template='context-grid.html'
249 return render_template(template, total=result.total,
227 return render_template(template, total=total, meta=meta,
250228 query=query, total_pages=total_pages, fill=fill,
251229 result=r, type='context', info=info, page=page)
252230
231@app.route('/context/view/<context_guid>/<query>')
253232@app.route('/context/view/<context_guid>')
254def resource_browser(context_guid=None):
233@app.route('/context/questions/<context_guid>')
234@app.route('/context/ideas/<context_guid>')
235@app.route('/context/problems/<context_guid>')
236def resource_browser(context_guid=None, query=None):
255237 """
256238 Context Resources View
257239 """
258 result = client.Question.find(context=context_guid)
240 #result = client.Question.find(context=context_guid)
241 page=request.args.get('page')
242 if page:
243 page=int(page)
244 else:
245 page=1
259246
247 resource=split(request.path, "/")[2]
248 if resource=='questions':
249 resource_object=Questions
250 resource_label=_("questions")
251 if resource=='problems':
252 resource_object=Problems
253 resource_label=_("problems")
254 if resource=='ideas':
255 resource_object=Ideas
256 resource_label=_("ideas")
257
258 try:
259 r, total_pages, total, info = paginate(resource_object,
260 query, page=page, _PAGE_SIZE=4, context=context_guid)
261 except KeyError:
262 return redirect(url_for('resource_browser',
263 context_guid=context_guid, page=1))
264
265 meta=_("browsing %(total)s %(resource_label)s",
266 total=total, resource_label=resource_label)
267
260268 context=client.Context(context_guid, reply=['guid', 'title'])
261269 session['last_context']=context_guid
262270
263 return render_template('context-view.html',result=result,
264 type='resource', context=context)
271 if '_pjax' in request.args:
272 template='context-content.html'
273 else:
274 template='context-view.html'
275 return render_template(template,result=r,resource=resource,
276 total_pages=total_pages,info=info,meta=meta,
277 type='resource', context=context,page=page)
265278
266@app.route('/submit_resource', methods=['POST'])
267def new_resource():
268 question = client.Question()
269 question['content'] = request.form['content']
270 question['title'] = request.form['title']
271 question['context'] = request.form['guid']
272 question.post()
273 return redirect('/context/view/%s' % question['context'])
279@app.route('/submit_resource/<resource>', methods=['POST'])
280def new_resource(resource):
281 if resource=='question':
282 resource = client.Question()
283 if resource=='idea':
284 resource = client.Idea()
285 if resource=='problem':
286 resource = client.Problem()
287 resource['content'] = request.form['content']
288 resource['title'] = request.form['title']
289 resource['context'] = request.form['guid']
290 resource.post()
291 return redirect('/context/resource/%s' % resource['context'])
274292
275293def shutdown_server():
276294 if server_pid:
  
120120li.resource-list {
121121 clear: both;
122122 overflow: auto;
123 text-align: left;
123124 }
124125
125126li.resource-list + li.resource-list {
145145
146146div.resource-title {
147147 font-weight: bold;
148 clear:both;
148149 }
150div.resource-content {
151 width:100%;
152 }
149153
150154div.resource-meta {
151155 position: absolute;
183183
184184div.context-grid-box {
185185 width: 900px;
186 height: 450px;
186 height: 550px;
187187 }
188188
189189div.grid-item {
202202 width: 150px;
203203 }
204204
205div.context-label {
206 display: table-cell;
207 vertical-align: middle;
208 }
209
205210.iconbox a {
206211 color: black;
207212 text-decoration: none;
232232 }
233233
234234.question-icon {
235 top:32px;
236 left:168px;
235 top:25px;
236 left:165px;
237237 position:absolute;
238238 background-color: #fff;
239239 z-index: 110;
240240 }
241241
242.idea-icon {
243 top:65px;
244 left:165px;
245 position:absolute;
246 background-color: #fff;
247 z-index: 110;
248 }
249
242250.problem-icon {
243 top:72px;
244 display:none;
245 left:168px;
251 top:105px;
252 left:165px;
246253 position:absolute;
247254 background-color: #fff;
248255 z-index: 110;
249256 }
250257
251258
252.launch-icon {
253 top:92px;
254 left:168px;
259.gallery-icon {
260 top:145px;
261 left:165px;
255262 position:absolute;
256263 background-color: #fff;
257264 z-index: 110;
284284 text-align: center;
285285 }
286286
287#mejorar-sistema {
288 position: absolute;
289 bottom: 60px;
290 right: 20px;
291 }
292
293
287294/* root element for accordion. decorated with rounded borders and gradient background image */
288295#accordion {
296 top: 320px;
297 left:40px;
298 position:absolute;
289299 border-radius: 15px;
290300 padding:15px;
291 background:#808080;
301 /*background:#808080;*/
292302 width: 300px;
293303 border:1px solid #282828;
294304 -background:#666;
321321/* currently active header */
322322#accordion h2.current {
323323 cursor:default;
324 background-color:#fff;
324 background-color:#282828;
325 color:#fff;
326 font-weight:bold;
325327}
326328
327329/* accordion pane */
385385 text-align: center;
386386}
387387
388#resource-preview {
389 float:right;
390 }
388ul.browser-page{
389 list-style: none;
390 width: 700px;
391 height: 550px;
392 overflow: auto;
393 float:left;
394 text-align: center;
395}
391396
397
392398#resource-form-title {
393399 font-weight: bold;
394400 line-height: 40px;
431431
432432.resource-inputarea {
433433 width: 400px;
434 height: 100px;
434 height: 200px;
435435 border: 1px solid #282828;
436436 border-radius: 15px;
437437 }
460460}
461461.resource-scrollable {
462462 /* required settings */
463 position:relative;
463 position:absolute;
464 top:150px;
465 left:390px;
464466 overflow:hidden;
465 width: 400px;
466 height: 450px;
467 width: 700px;
468 height: 550px;
467469}
468470
469471/*
479479 width:20000em;
480480 position:absolute;
481481}
482.resource-scrollable .items {
483 /* this cannot be too large */
484 height:20000em;
485 position:absolute;
486}
482487
483488/*
484489a single item. must be floated in horizontal scrolling. typically,
518518/* up and down */
519519a.up, a.down {
520520 background:url(/static/images/vert_large.png) no-repeat;
521 float: none;
522 margin: 10px 50px;
523521}
524522
525523/* up */
Binary files differ
  
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg
3 xmlns:dc="http://purl.org/dc/elements/1.1/"
4 xmlns:cc="http://creativecommons.org/ns#"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns="http://www.w3.org/2000/svg"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10 enable-background="new 0 0 55 55"
11 height="34"
12 version="1.1"
13 viewBox="0 0 45 34"
14 width="45"
15 x="0px"
16 xml:space="preserve"
17 y="0px"
18 id="svg4134"
19 inkscape:version="0.48.2 r9819"
20 sodipodi:docname="button-problem.svg"><metadata
21 id="metadata4151"><rdf:RDF><cc:Work
22 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
24 id="defs4149">
25
26
27
28
29
30
31 </defs><sodipodi:namedview
32 pagecolor="#ffffff"
33 bordercolor="#666666"
34 borderopacity="1"
35 objecttolerance="10"
36 gridtolerance="10"
37 guidetolerance="10"
38 inkscape:pageopacity="0"
39 inkscape:pageshadow="2"
40 inkscape:window-width="1024"
41 inkscape:window-height="550"
42 id="namedview4147"
43 showgrid="false"
44 inkscape:zoom="4.2909091"
45 inkscape:cx="-5.8262711"
46 inkscape:cy="27.5"
47 inkscape:window-x="-1"
48 inkscape:window-y="26"
49 inkscape:window-maximized="1"
50 inkscape:current-layer="svg4134" /><g
51 id="g3068"
52 transform="translate(2.7415255,0.00635576)"
53 style="fill:#ffffff"><rect
54 ry="3.3"
55 y="12"
56 x="14.758475"
57 height="10"
58 width="10"
59 id="rect3039"
60 style="fill:#ffffff;fill-opacity:1;stroke:#1a1a1a;stroke-width:2.74300003000000014;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none" /><rect
61 ry="3.3"
62 y="11.987288"
63 x="1.7584746"
64 height="10"
65 width="10"
66 id="rect3039-4"
67 style="fill:#ffffff;fill-opacity:1;stroke:#1a1a1a;stroke-width:2.74300003000000014;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none" /><rect
68 ry="3.3"
69 y="11.987288"
70 x="27.758474"
71 height="10"
72 width="10"
73 id="rect3039-40"
74 style="fill:#ffffff;fill-opacity:1;stroke:#1a1a1a;stroke-width:2.74300003000000014;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none" /></g></svg>
Binary files differ
  
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg
3 xmlns:dc="http://purl.org/dc/elements/1.1/"
4 xmlns:cc="http://creativecommons.org/ns#"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns="http://www.w3.org/2000/svg"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10 enable-background="new 0 0 55 55"
11 height="34"
12 version="1.1"
13 viewBox="0 0 45 34"
14 width="45"
15 x="0px"
16 xml:space="preserve"
17 y="0px"
18 id="svg4134"
19 inkscape:version="0.48.2 r9819"
20 sodipodi:docname="button-idea.svg"><metadata
21 id="metadata4151"><rdf:RDF><cc:Work
22 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
24 id="defs4149">
25
26
27
28
29 </defs><sodipodi:namedview
30 pagecolor="#ffffff"
31 bordercolor="#666666"
32 borderopacity="1"
33 objecttolerance="10"
34 gridtolerance="10"
35 guidetolerance="10"
36 inkscape:pageopacity="0"
37 inkscape:pageshadow="2"
38 inkscape:window-width="1024"
39 inkscape:window-height="550"
40 id="namedview4147"
41 showgrid="false"
42 inkscape:zoom="4.2909091"
43 inkscape:cx="27.5"
44 inkscape:cy="27.5"
45 inkscape:window-x="-1"
46 inkscape:window-y="26"
47 inkscape:window-maximized="1"
48 inkscape:current-layer="svg4134" /><polyline
49 transform="translate(-5.003,-10.4995)"
50 points="32.594,15.42 22.412,27.5 32.594,27.5 22.412,39.579 "
51 id="polyline11"
52 style="fill:#ffffff;stroke:#ffffff;stroke-width:5;stroke-linecap:round" /></svg>
Binary files differ
  
1515 x="0px"
1616 xml:space="preserve"
1717 y="0px"
18 id="svg7742"
18 id="svg4134"
1919 inkscape:version="0.48.2 r9819"
20 sodipodi:docname="button-problem.svg"><metadata
21 id="metadata7758"><rdf:RDF><cc:Work
20 sodipodi:docname="emblem-notification.svg"><metadata
21 id="metadata4151"><rdf:RDF><cc:Work
2222 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
2323 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
24 id="defs7756">
24 id="defs4149">
2525
2626
2727
3535 guidetolerance="10"
3636 inkscape:pageopacity="0"
3737 inkscape:pageshadow="2"
38 inkscape:window-width="1024"
39 inkscape:window-height="600"
40 id="namedview7754"
38 inkscape:window-width="640"
39 inkscape:window-height="480"
40 id="namedview4147"
4141 showgrid="false"
42 inkscape:zoom="8.5818182"
43 inkscape:cx="19.083493"
44 inkscape:cy="13.516949"
45 inkscape:window-x="-1"
46 inkscape:window-y="-24"
42 inkscape:zoom="4.2909091"
43 inkscape:cx="27.5"
44 inkscape:cy="27.5"
45 inkscape:window-x="6"
46 inkscape:window-y="26"
4747 inkscape:window-maximized="0"
48 inkscape:current-layer="svg7742" /><path
49 style="fill:none;stroke:#ffffff;stroke-width:3.30318952000000010;stroke-opacity:0"
50 d="m 0.61424803,0.71436102 0,33.16063898 42.97950197,0 0,-33.16063898 -42.97950197,0 z"
51 id="rect7746"
52 inkscape:connector-curvature="0" /><path
53 sodipodi:type="spiral"
54 style="fill:#000000;stroke:#ffffff;stroke-width:3.69219040999999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none"
55 id="path2985"
56 sodipodi:cx="15.148305"
57 sodipodi:cy="11.860169"
58 sodipodi:expansion="1"
59 sodipodi:revolution="3"
60 sodipodi:radius="20.200615"
61 sodipodi:argument="-18.248755"
62 sodipodi:t0="0"
63 d="m 15.148305,11.860169 c 0.835463,0.572555 -0.359604,1.408667 -0.951624,1.388595 -1.604336,-0.05439 -2.220408,-1.981302 -1.825566,-3.2918418 0.706279,-2.3442475 3.530157,-3.1307077 5.632061,-2.2625379 3.084628,1.274074 4.063003,5.0982217 2.699509,7.9722797 -1.817322,3.830666 -6.67287,5.00437 -10.312498,3.136481 C 5.8100866,16.452596 4.439816,10.552547 6.8167347,6.1504279 9.6955017,0.81887241 16.646784,-0.74861451 21.80967,2.1400041 27.893952,5.5441412 29.659059,13.550577 26.257065,19.473158 22.329329,26.311012 13.265252,28.274012 6.5836927,24.357525 -1.0083202,19.907364 -3.1694074,9.7839689 1.2623545,2.3439336 6.2341217,-6.0026617 17.418021,-8.3619815 25.616164,-3.414376 34.717657,2.0784038 37.27532,14.323678 31.811445,23.279652"
64 transform="matrix(0.69251951,0,0,0.75439052,11.658958,9.6170506)" /></svg>
48 inkscape:current-layer="svg4134" /><g
49 enable-background="new "
50 id="g4143"
51 transform="translate(-4.6610169,-10.04661)"
52 style="fill:#ffffff">
53 <path
54 d="m 24.563,37.676 c 0,-1.547 1.26,-2.807 2.808,-2.807 1.547,0 2.808,1.26 2.808,2.807 0,1.549 -1.261,2.809 -2.808,2.809 -1.548,-10e-4 -2.808,-1.26 -2.808,-2.809 z m 0.216,-21.237 c 0,-1.512 1.116,-2.447 2.592,-2.447 1.44,0 2.591,0.972 2.591,2.447 v 13.858 c 0,1.477 -1.151,2.449 -2.591,2.449 -1.476,0 -2.592,-0.938 -2.592,-2.449 V 16.439 z"
55 id="path4145"
56 inkscape:connector-curvature="0"
57 style="fill:#ffffff" />
58 </g></svg>
Binary files differ
  
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg
3 xmlns:dc="http://purl.org/dc/elements/1.1/"
4 xmlns:cc="http://creativecommons.org/ns#"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns="http://www.w3.org/2000/svg"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10 enable-background="new 0 0 55 55"
11 height="24"
12 version="1.1"
13 viewBox="0 0 24 24"
14 width="24"
15 x="0px"
16 xml:space="preserve"
17 y="0px"
18 id="svg2985"
19 inkscape:version="0.48.2 r9819"
20 sodipodi:docname="moon.svg"><metadata
21 id="metadata2994"><rdf:RDF><cc:Work
22 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
24 id="defs2992" /><sodipodi:namedview
25 pagecolor="#ffffff"
26 bordercolor="#666666"
27 borderopacity="1"
28 objecttolerance="10"
29 gridtolerance="10"
30 guidetolerance="10"
31 inkscape:pageopacity="0"
32 inkscape:pageshadow="2"
33 inkscape:window-width="1024"
34 inkscape:window-height="600"
35 id="namedview2990"
36 showgrid="false"
37 inkscape:zoom="6.8173053"
38 inkscape:cx="2.3016933"
39 inkscape:cy="7.254294"
40 inkscape:window-x="0"
41 inkscape:window-y="26"
42 inkscape:window-maximized="0"
43 inkscape:current-layer="svg2985" /><g
44 id="g2984"
45 transform="translate(0.88011308,0.14668552)"><path
46 transform="matrix(1.8356433,0,0,-2.6257525,-5.3382481,65.183076)"
47 sodipodi:open="true"
48 sodipodi:end="5.0073496"
49 sodipodi:start="1.2356931"
50 d="M 12.277372,23.36002 C 9.7972228,23.953149 7.0865147,23.053231 6.2228355,21.349996 5.3591563,19.646762 6.6695637,17.785191 9.1497125,17.192062 10.100735,16.964624 11.132344,16.950403 12.095891,17.151447"
51 sodipodi:ry="3.265625"
52 sodipodi:rx="4.7552085"
53 sodipodi:cy="20.276041"
54 sodipodi:cx="10.713542"
55 id="path3827"
56 style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.69524753;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
57 sodipodi:type="arc" /><path
58 transform="matrix(1,0,0,1.7598964,29.923847,-16.571023)"
59 sodipodi:open="true"
60 sodipodi:end="5.0073496"
61 sodipodi:start="1.2356931"
62 d="m -11.756955,21.042517 c -2.582077,0.915826 -5.404189,-0.4737 -6.303364,-3.103594 -0.899174,-2.629893 0.465088,-5.504266 3.047165,-6.420092 0.990107,-0.351177 2.064114,-0.373136 3.06726,-0.06271"
63 sodipodi:ry="5.042315"
64 sodipodi:rx="4.9506364"
65 sodipodi:cy="16.280674"
66 sodipodi:cx="-13.385055"
67 id="path4288"
68 style="fill:#000000;stroke-width:1.597;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none"
69 sodipodi:type="arc" /><path
70 transform="matrix(1.3229337,0,0,2.1280514,32.327188,-14.997576)"
71 sodipodi:open="true"
72 sodipodi:end="5.0073496"
73 sodipodi:start="1.2356931"
74 d="m -9.2591244,16.793782 c -2.0943516,0.779284 -4.3833976,-0.403076 -5.1127276,-2.640876 -0.729331,-2.237801 0.377237,-4.683631 2.471589,-5.4629155 0.803087,-0.2988195 1.674225,-0.3175045 2.4878885,-0.053363"
75 sodipodi:ry="4.2905517"
76 sodipodi:rx="4.0155163"
77 sodipodi:cy="12.741886"
78 sodipodi:cx="-10.579694"
79 id="path4292"
80 style="fill:#ffffff;stroke-width:1.597;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none"
81 sodipodi:type="arc" /></g></svg>
  
1010 {% include 'toolbar.html' %}
1111 {% block view %}{% endblock view %}
1212 <script type="text/javascript">
13 function init_styles() {
14 /* $('.star-emblem').hover( function() {
15 $(this).css('background-color','{{fill}}');
16 }, function() {
17 $(this).css('background-color','#fff');
18 }); */
19 $('.grid-icon').hover( function() {
20 $(this).parent().parent().parent().find('img:first').css('background-color', '#c5c5c5');
21 $(this).parent().parent().parent().find('img:eq(1)').css('background-color', '#c5c5c5');
22 $(this).parent().parent().parent().find('img:eq(2)').css('background-color', '#c5c5c5');
23 $(this).parent().parent().parent().find('img:eq(3)').css('background-color', '#c5c5c5');
24 }, function() {
25 $(this).parent().parent().parent().find('img:first').css('background-color', '#fff');
26 $(this).parent().parent().parent().find('img:eq(1)').css('background-color', '#fff');
27 $(this).parent().parent().parent().find('img:eq(2)').css('background-color', '#fff');
28 $(this).parent().parent().parent().find('img:eq(3)').css('background-color', '#fff');
29 });
30 $('.gallery-icon').hover( function() {
31 $(this).css('background-color', '#808080');
32 }, function() {
33 $(this).css('background-color', '#fff');
34 });
35 $('.question-icon').hover( function() {
36 $(this).css('background-color', '#808080');
37 }, function() {
38 $(this).css('background-color', '#fff');
39 });
40 $('.idea-icon').hover( function() {
41 $(this).css('background-color', '#808080');
42 }, function() {
43 $(this).css('background-color', '#fff');
44 });
45 $('.problem-icon').hover( function() {
46 $(this).css('background-color', '#808080');
47 }, function() {
48 $(this).css('background-color', '#fff');
49 });
50 $('.star-emblem').click( function() {
51 if ( $(this).data('vote') == true) {
52 $(this).css('background-color','#fff');
53 $(this).data('vote', false);
54 }
55 else {
56 $(this).css('background-color','{{fill}}');
57 $(this).data('vote', true);
58 }
59 $.get('/_stars/' + $(this).attr("id") + '?vote=' +
60 $(this).data('vote'),
61 function (data) {/* alert (data.vote) */} );
62 });
63 };
64 $(document).ready(function() {
65 init_styles();
66 });
1367 /* For deleting elements from tag palette */
1468 function bind_del () {
1569 $('.tag').click( function () {
  
1 <ul class="browser-page" id='resource-page-{{page}}'>
2 {%- for item in result %}
3 <li class="resource-list">
4 <div class="summary-column">
5 <div class="resource-title">
6 {{item['title']}}
7 </div>
8 <div class="resource-content">
9 {{item['content']}}
10 </div>
11 <div class="resource-meta">
12 {%- for tag in item['tags'] %}
13 <span class="tag">{{tag}}</span>
14 {%- endfor %}
15 </div>
16 </div>
17 <div class="icon-column">
18 {%- if item['author'] %}
19 <img src="/static/icons/sugar-xo.png"/>
20 {%- endif %}
21 </div>
22 </li>
23<!--
24 <div class="browser-iconbox">
25 <img src="/static/icons/emblem-question.png" alt="Es una pregunta"/>
26 </div>
27 <div class="browser-title">
28 {{item['title']}}
29 </div>
30 <div class="browser-summary">
31 {{item['content']}}
32 </div>
33 -->
34 {%- endfor %}
35 </ul>
  
2626 </div>
2727 </div>
2828 <script type='text/javascript'>
29 function init_styles() {
30 /* $('.star-emblem').hover( function() {
31 $(this).css('background-color','{{fill}}');
32 }, function() {
33 $(this).css('background-color','#fff');
34 }); */
35 $('.grid-icon').hover( function() {
36 $(this).parent().parent().parent().find('img:first').css('background-color', '#c5c5c5');
37 $(this).parent().parent().parent().find('img:eq(1)').css('background-color', '#c5c5c5');
38 }, function() {
39 $(this).parent().parent().parent().find('img:first').css('background-color', '#fff');
40 $(this).parent().parent().parent().find('img:eq(1)').css('background-color', '#fff');
41 });
42 $('.launch-icon').hover( function() {
43 $(this).css('background-color', '#808080');
44 }, function() {
45 $(this).css('background-color', '#fff');
46 });
47 $('.question-icon').hover( function() {
48 $(this).css('background-color', '#808080');
49 }, function() {
50 $(this).css('background-color', '#fff');
51 });
52 $('.star-emblem').click( function() {
53 if ( $(this).data('vote') == true) {
54 $(this).css('background-color','#fff');
55 $(this).data('vote', false);
56 }
57 else {
58 $(this).css('background-color','{{fill}}');
59 $(this).data('vote', true);
60 }
61 $.get('/_stars/' + $(this).attr("id") + '?vote=' +
62 $(this).data('vote'),
63 function (data) {/* alert (data.vote) */} );
64 });
65 };
66
6729 $(function() {
68 init_styles();
6930 // initialize scrollable
7031 $(".scrollable").scrollable();
7132
4545 init_styles();
4646 }
4747 );
48 $( '#resource-page-'+last_page ).empty().append('<div id="throbber-box"><img id="throbber" src="/static/images/throbber10.gif" /></div>');
48 $( '#resource-page-'+last_page ).empty().append('<div id="throbber-box"><img id="throbber" src="/static/images/throbber10.gif" /></div>');
4949 last_page=new_page;
5050 $( '#info' ).empty().append('{% trans %}page '+new_page+' of{% endtrans %} {{total_pages}}');
5151 });
  
11 {% extends "base.html" %}
22 {% block view %}
3 <div class="grid-item">
4 <a href="/context/questions/{{context['guid']}}">
5 <img class="question-icon" src="/static/icons/button-question.png" />
6 </a>
7 <a href="/context/ideas/{{context['guid']}}">
8 <img class="idea-icon" src="/static/icons/button-idea.png" />
9 </a>
10 <a href="/context/problems/{{context['guid']}}">
11 <img class="problem-icon" src="/static/icons/button-problem.png" />
12 </a>
13 <div class="iconbox">
14 <a href="/launch/{{context['guid']}}">
15 <img class="grid-icon" src="/context/icon/{{context['guid']}}" />
16 </a>
17 <img id="star-{{context['guid']}}"
18 {% if context['keep'] %}
19 style="background-color:{{fill}}"
20 {% endif %}
21 class="star-emblem" src="/static/icons/add-link-small-inverted.png"/>
22 {{context['title']}}
23 </div>
24 </div>
325 <div id="context-panel">
4 <div id="context-icon">
5 <img class="grid-icon" src="/context/icon/{{context['guid']}}" />
6 {{context['title']}}
7 </div>
8
926 <div id="accordion">
10 <h2 class="current">{{_('Owner(s)')}}</h2>
11 <div class="pane" style="display:block">
27 <h2 class="current">{{_('Description')}}</h2>
28 <div class="pane" style="display:block">{{context['description']}}</div>
29
30 <h2>{{_('Owner(s)')}}</h2>
31 <div class="pane">
1232 <div id="sugar-man">
1333 <img class="grid-icon" src="/static/icons/sugar-xo.png" />
1434 </div>
3636
3737 <h2>{{_('License')}}</h2>
3838 <div class="pane">... pane content ...</div>
39
40 <h2>{{_('Description')}}</h2>
41 <div class="pane">{{context['description']}}</div>
4239 </div>
43
4440 </div>
4541 <div id="resource-section">
4642 <div id="resource-preview">
47 <div id="browser-controls">
48 <a class="prev browse left"></a>
49 <a class="next browse right"></a>
50 </div>
51 <div id="resource-count">
52 <span id="selected-resource">1</span> of {{ result.total }}
53 </div>
5443 <div class="resource-scrollable" id="resource-scrollable">
5544 <div class="items">
56 {%- for item in result %}
57 <div class="browser-item">
58 <div class="browser-iconbox">
59 <img src="/static/icons/emblem-question.png" alt="Es una pregunta"/>
45 {%- for item in range(page-1) %}
46 <ul class='browser-page' id="resource-page-{{item+1}}">
47 <div id='throbber-box'>
48 <img id='throbber' src="/static/images/throbber10.gif" />
6049 </div>
61 <div class="browser-title">
62 {{item['title']}}
50 </ul>
51 {%- endfor %}
52 {% include 'context-content.html' %}
53 {%- for item in range(total_pages-page) %}
54 <ul class='browser-page' id="resource-page-{{item+page+1}}">
55 <div id='throbber-box'>
56 <img id='throbber' src="/static/images/throbber10.gif" />
6357 </div>
64 <div class="browser-summary">
65 {{item['content']}}
66 </div>
67 </div>
58 </ul>
6859 {%- endfor %}
6960 </div>
7061 </div>
7162 </div>
7263 </div>
64 <div id="mejorar-sistema" onclick="location='/new/resource'">
65 <div>
66 <img class="toolbar-icon" src="/static/icons/mejorar-sistema.png" />
67 </div>
68 </div>
69 <div id='bottom-palette'>
70 <div id='nav-buttons'>
71 <a class="prev browse up pagination_button"></a>
72 <a class="next browse down pagination_button"></a>
73 </div>
74 </div>
7375 <script type="text/javascript">
76 function init_styles() {
77 /* $('.star-emblem').hover( function() {
78 $(this).css('background-color','{{fill}}');
79 }, function() {
80 $(this).css('background-color','#fff');
81 }); */
82 $('.grid-icon').hover( function() {
83 $(this).parent().parent().parent().find('img:first').css('background-color', '#c5c5c5');
84 $(this).parent().parent().parent().find('img:eq(1)').css('background-color', '#c5c5c5');
85 $(this).parent().parent().parent().find('img:eq(2)').css('background-color', '#c5c5c5');
86 $(this).parent().parent().parent().find('img:eq(3)').css('background-color', '#c5c5c5');
87 }, function() {
88 $(this).parent().parent().parent().find('img:first').css('background-color', '#fff');
89 $(this).parent().parent().parent().find('img:eq(1)').css('background-color', '#fff');
90 $(this).parent().parent().parent().find('img:eq(2)').css('background-color', '#fff');
91 $(this).parent().parent().parent().find('img:eq(3)').css('background-color', '#fff');
92 });
93 $('.gallery-icon').hover( function() {
94 $(this).css('background-color', '#808080');
95 }, function() {
96 $(this).css('background-color', '#fff');
97 });
98 $('.question-icon').hover( function() {
99 $(this).css('background-color', '#808080');
100 }, function() {
101 $(this).css('background-color', '#fff');
102 });
103 $('.idea-icon').hover( function() {
104 $(this).css('background-color', '#808080');
105 }, function() {
106 $(this).css('background-color', '#fff');
107 });
108 $('.problem-icon').hover( function() {
109 $(this).css('background-color', '#808080');
110 }, function() {
111 $(this).css('background-color', '#fff');
112 });
113 $('.star-emblem').click( function() {
114 if ( $(this).data('vote') == true) {
115 $(this).css('background-color','#fff');
116 $(this).data('vote', false);
117 }
118 else {
119 $(this).css('background-color','{{fill}}');
120 $(this).data('vote', true);
121 }
122 $.get('/_stars/' + $(this).attr("id") + '?vote=' +
123 $(this).data('vote'),
124 function (data) {/* alert (data.vote) */} );
125 });
126 };
74127 $(function() {
128 init_styles();
75129 $("#accordion").tabs(
76130 "#accordion div.pane",
77131 {tabs: 'h2', effect: 'slide', initialIndex: null}
78132 );
79133
80134 // initialize scrollable
81 $(".resource-scrollable").scrollable( vertical=true );
82
83 var api = $("#scrollable").data("scrollable");
135 $(".resource-scrollable").scrollable( {vertical:true} );
136 var api = $("#resource-scrollable").data("scrollable");
137 var last_page = {{page}};
138 api.seekTo({{page-1}},0);
84139 api.onSeek( function() {
85 $( "#selected-resource" ).empty().append( this.getIndex() + 1 );
140 new_page = api.getIndex()+1;
141 history.pushState(null,null,'?page=' + new_page);
142 $.get( '?page='+new_page+'&_pjax', { },
143 function( data ) {
144 $( '#resource-page-'+new_page ).empty().append( data );
145 }
146 );
147 $( '#resource-page-'+last_page ).empty().append('<div id="throbber-box"><img id="throbber" src="/static/images/throbber10.gif" /></div>');
148 last_page=new_page;
149 $( '#info' ).empty().append('{% trans %}page '+new_page+' of{% endtrans %} {{total_pages}}');
86150 });
87151 });
88152 </script>
  
2121 </form>
2222 <div id="submit-buttons">
2323 <img class="question-button" src="/static/icons/emblem-question.png" alt="Es una pregunta"/>
24 <img src="/static/icons/emblem-notification.png" alt="Es un problema" />
25 <img src="/static/icons/emblem-charging.png" alt="Es una idea" />
24 <img class="problem-button" src="/static/icons/emblem-notification.png" alt="Es un problema" />
25 <img class="idea-button" src="/static/icons/emblem-charging.png" alt="Es una idea" />
2626 </div>
2727</div>
2828<script type="text/javascript">
3030 $("#search").attr('disabled', true);
3131 });
3232 $(".question-button").click(function() {
33 $("#resource-form1").attr('action', '/submit_resource/question');
34 $("#resource-form1").submit();
35 });
36 $(".idea-button").click(function() {
37 $("#resource-form1").attr('action', '/submit_resource/idea');
38 $("#resource-form1").submit();
39 });
40 $(".problem-button").click(function() {
41 $("#resource-form1").attr('action', '/submit_resource/problem');
3342 $("#resource-form1").submit();
3443 });
3544</script>
  
11 <div class="context-grid-box" id='resource-page-{{page}}'>
2 {%- for item in result[:6] %}
2 {%- for context in result[:6] %}
33 <div class="grid-item">
4 <a href="/launch/{{item['guid']}}">
5 <img class="launch-icon" src="/static/icons/activity-start.png" />
4 <a href="/context/questions/{{context['guid']}}">
5 <img class="question-icon" src="/static/icons/button-question.png" />
66 </a>
7 <img class="question-icon" src="/static/icons/button-question.png" />
7 <a href="/context/ideas/{{context['guid']}}">
8 <img class="idea-icon" src="/static/icons/button-idea.png" />
9 </a>
10 <a href="/context/problems/{{context['guid']}}">
811 <img class="problem-icon" src="/static/icons/button-problem.png" />
12 </a>
13 <!--img class="gallery-icon" src="/static/icons/button-gallery.png" /-->
14
915 <div class="iconbox">
10 <a href="/context/view/{{item['guid']}}">
11 <img class="grid-icon" src="/context/icon/{{item['guid']}}" />
16 <a href="/launch/{{context['guid']}}">
17 <img class="grid-icon" src="/context/icon/{{context['guid']}}" />
1218 </a>
13 <img id="star-{{item['guid']}}"
14 {% if item['vote'] %}
19 <div class="context-label">
20 <img id="moon-{{context['guid']}}"
21 {% if context['keep'] %}
1522 style="background-color:{{fill}}"
1623 {% endif %}
17 class="star-emblem" src="/static/icons/add-link-small-inverted.png"/>
18 {{item['title']}}
24 class="moon-emblem" src="/static/icons/moon.png"/>
25
26 <img id="star-{{context['guid']}}"
27 {% if context['vote'] %}
28 style="background-color:{{fill}}"
29 {% endif %}
30 class="star-emblem" src="/static/icons/add-link-small.png"/>
31 {{context['title']}}
32 </div>
1933 </div>
2034 </div>
2135 {%- endfor %}
  
55 <img class="toolbar-icon" src="/static/icons/sugar-network.png" />
66 </div>
77 </li>
8 <li class="toolbar-items" onclick="location='/new/resource'">
9 <div>
10 <img class="toolbar-icon" src="/static/icons/mejorar-sistema.png" />
11 </div>
12 </li>
138 <!--li class="toolbar-items" onclick="location='/favorites'">
149 <div>
1510 <img class="toolbar-icon" src="/static/icons/tool-shape-star.png" />
3232 </ul>
3333 </div>
3434 <div id="palette">
35 {%- if (page or total_pages) != total_pages %}
36 <!--input class="pagination_button" type="button" value="»" onclick="location='?page={{ (page or 0) +1 }}'" /-->
37 {%- endif %}
3835 <span id="tags-section">
3936 {%- for tag in session.tags %}
4037 <span class="tag">{{tag}}</span>
4138 {%- endfor %}
4239 </span>
43 <span id="meta">{% trans %}browsing {{total}} objects{% endtrans %}</span>
40 <span id="meta">{{meta}}</span>
4441 <span id="info">{{info}}</span>
45 {%- if (page or None) > 1 %}
46 <!--input class="pagination_button" type="button" value="«" onclick="location='?page={{ (page or 0) -1 }}'" /-->
47 {%- endif %}
4842 </div>
  
77msgstr ""
88"Project-Id-Version: PROJECT VERSION\n"
99"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10"POT-Creation-Date: 2012-04-21 21:24-0500\n"
10"POT-Creation-Date: 2012-05-02 03:45-0500\n"
1111"PO-Revision-Date: 2012-04-21 20:49-0500\n"
1212"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313"Language-Team: es <LL@li.org>\n"
1717"Content-Transfer-Encoding: 8bit\n"
1818"Generated-By: Babel 0.9.6\n"
1919
20#: app.py:197
20#: app.py:182
2121msgid "zero results"
2222msgstr "cero resultados"
2323
24#: app.py:199
25#, python-format
24#: app.py:184
2625msgid "page %(page)s of %(total)s"
2726msgstr "página %(page)s de %(total)s"
2827
29#: templates/context-grid.html:89
28#: app.py:220
29#, python-format
30msgid "browsing %(total)s contexts"
31msgstr "navegando por %(total)s contextos"
32
33#: app.py:249
34msgid "questions"
35msgstr "preguntas"
36
37#: app.py:252
38msgid "problems"
39msgstr "problemas"
40
41#: app.py:255
42msgid "ideas"
43msgstr "ideas"
44
45#: app.py:264
46msgid "browsing %(total)s %(resource_label)s"
47msgstr "navegando por %(total)s %(resource_label)s"
48
49#: templates/context-grid.html:50 templates/context-view.html:152
3050msgid "page '+new_page+' of"
3151msgstr "página '+new_page+' de"
3252
33#: templates/context-view.html:10
53#: templates/context-view.html:30
54msgid "Description"
55msgstr "Descripción"
56
57#: templates/context-view.html:33
3458msgid "Owner(s)"
3559msgstr "Dueño(s)"
3660
37#: templates/context-view.html:17
61#: templates/context-view.html:40
3862msgid "License"
3963msgstr "Licencia"
40
41#: templates/context-view.html:20
42msgid "Description"
43msgstr "Descripción"
44
45#: templates/toolbar.html:48
46#, python-format
47msgid "browsing %(total)s objects"
48msgstr "navegando por %(total)s objetos"