Commit 2ecc4e787127b1d21a42da76e15736162025ce89
1 parent
c1808b38
Exists in
master
and in
1 other branch
Improving popup for package information.
Showing
3 changed files
with
13 additions
and
5 deletions
Show diff stats
src/web/server.py
| ... | ... | @@ -61,8 +61,12 @@ class Package: |
| 61 | 61 | def GET(self, pkg): |
| 62 | 62 | json_source = "http://dde.debian.net/dde/q/udd/packages/all/%s?t=json" % pkg #FIXME: url goes to config |
| 63 | 63 | json_data = json.load(urllib.urlopen(json_source)) |
| 64 | + # parsing tags: | |
| 64 | 65 | tags = self._debtags_list_to_dict(json_data['r']['tag']) |
| 65 | 66 | json_data['r']['tag'] = tags |
| 67 | + # formatting long description | |
| 68 | + json_data['r']['long_description'] = json_data['r']['long_description'].replace(' .\n','').replace('\n','<br />') | |
| 69 | + print json_data['r']['long_description'] | |
| 66 | 70 | return render_plain.package(json_data['r']) |
| 67 | 71 | |
| 68 | 72 | def _debtags_list_to_dict(self, debtags_list): | ... | ... |
src/web/templates/apprec.html
| ... | ... | @@ -28,7 +28,7 @@ $for strategy, result in recommends.items(): |
| 28 | 28 | $for pkg in result: |
| 29 | 29 | $ count = count + 1 |
| 30 | 30 | <td style="text-align: center; border: 4px solid rgb(255, 255, 255); min-width: 160px;"> |
| 31 | - <p><a href="package/$pkg?height=350&width=500" class="thickbox" title="General information for package $pkg"><b>$pkg</b></a></p> | |
| 31 | + <p><a href="package/$pkg?height=350&width=650" class="thickbox" title="General information for package $pkg"><b>$pkg</b></a></p> | |
| 32 | 32 | <div class="screenshots cycle" style="height: 120px"> |
| 33 | 33 | <a class="image" href="http://screenshots.debian.net/screenshot/$pkg" title="Screenshot of package $pkg"> |
| 34 | 34 | <img src="http://screenshots.debian.net/thumbnail/$pkg" alt="Screenshot"> | ... | ... |
src/web/templates/package.html
| ... | ... | @@ -4,7 +4,7 @@ $def with (pkg) |
| 4 | 4 | <table><tr><td class="noborder"> |
| 5 | 5 | <h2>Details</h2> |
| 6 | 6 | <ul> |
| 7 | - <li><b>Description</b>: $pkg['long_description']</li> | |
| 7 | + <li><b>Description</b>: <br />$:pkg['long_description']</li> | |
| 8 | 8 | $if pkg['homepage']: |
| 9 | 9 | <li><b>Homepage</b>:<a href="$pkg['homepage']">$pkg['homepage']</a></li> |
| 10 | 10 | $if pkg['task']: |
| ... | ... | @@ -21,13 +21,17 @@ $def with (pkg) |
| 21 | 21 | <h2>Debian resources:</h2> |
| 22 | 22 | <ul> |
| 23 | 23 | <li><a href="http://packages.debian.org/$pkg['package']">Package page on debian.org</a></li> |
| 24 | - <li><a href="http://bugs.debian.org/$pkg['package']">Bug reports</a></li> | |
| 24 | + <li><a href="http://bugs.debian.org/$pkg['package']">Debian bug tracking system (BTS)</a></li> | |
| 25 | + <li><a href="http://packages.qa.debian.org/$pkg['package']">Debian package tracking system (PTS)</a></li> | |
| 26 | + <li><a href="http://qa.debian.org/popcon.php?package=$pkg['package']">Popularity contest statistics (Popcon)</a></li> | |
| 25 | 27 | <li><a href="http://patch-tracker.debian.org/package/$pkg['package']">Debian patch tracking system</a></li> |
| 26 | - <li><a href="http://packages.qa.debian.org/$pkg['package']">Debian package tracking system</a></li> | |
| 27 | - <li><a href="http://qa.debian.org/popcon.php?package=$pkg['package']">Popularity contest statistics</a></li> | |
| 28 | + <li><a href="http://screenshots.debian.net/package/$pkg['package']">Screenshots</a></li> | |
| 28 | 29 | </ul> |
| 29 | 30 | </td> |
| 30 | 31 | <td class="noborder"> |
| 32 | +<p> </p> | |
| 33 | +</td> | |
| 34 | +<td class="noborder"> | |
| 31 | 35 | <h2>Debtags</h2> |
| 32 | 36 | <ul> |
| 33 | 37 | $for facet, tags in pkg['tag'].items(): | ... | ... |