summaryrefslogtreecommitdiff
path: root/packages/templatetags
AgeCommit message (Collapse)Author
2014-11-08Convert some of URL details to Jinja2Dan McGee
Anytime we have a loop with >100 items, the Django template engine begins to be the bottleneck. This one is relatively straightforward to convert, and sets the stage for converting the mirror status page as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Move maintainer/packager link code back into templateDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Break out Jinja2-specific template helpersDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Convert bulk of package details page to Jinja2Dan McGee
We wrap the whole thing in a Django template so we don't have to convert our base template to Jinja2 (or have one for each templating engine). This also simplifies the static stuff so we can just keep using the Django tags. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Convert details sub-tempates to Jinja2Dan McGee
This is a start at improving performance of rendering the package details page, our most-visited and slowest page on the production website. The Django template system is not very efficient due to our heavy use of broken out templates and pulling of various attributes and such on related packages. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-27Allow pkg_details_link to honor package flag stateDan McGee
This allows the tag to be used in a few more places we weren't already able to use it, and hopefully speeds up rendering a tad on the package differences page. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20Fix parsing issues when query string keys contain unicodeDan McGee
This is dirty, but it works. There is probably a better and cleaner way to do all of this, but for now just fix it quickly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Various minor code cleanups and fixesrelease_2013-04-16Dan McGee
Most of these were suggested by PyCharm, and include everything from little syntax issues and other bad smells to dead or bad code. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Allow pkg_details_link to return link title if package is missingDan McGee
For todolist packages that have had their package removed, this will allow the package name to continue to appear even after the linked package has been deleted. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30pkg_details_link template tag enhancementsDan McGee
* Output the blank string when passed None for pkg argument * Allow override of the link text if optional argument passed Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-21Fix scm_link in a way that doesn't make cgit barfDan McGee
This does what commit cd51842ce86 set out to do in a way that doesn't break cgit's not-so-hit query string parsing. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-21Style cleanups in package_extrasDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-21Revert "Fix scm_link for Unicode characters"Dan McGee
This reverts commit cd51842ce86c44eef4e3c3d5334aca13e234151a. It turns out cgit doesn't like it if you escape the '/' in the URL parameter when viewing the log (a clear upstream bug), but we need to be able to work around this. Example: 'extra%2Fkdelibs' and 'extra/kdelibs' are handled differently.
2012-08-20Fix scm_link for Unicode charactersDan McGee
This blew up with non-ASCII due to us trying to stuff 8-bit characters into the URL parameters where they aren't allowed. Tested with a package entered via the admin with pkgname and pkgbase set to 'αναζήτη'. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-03Use https:// links for all internal sitesDan McGee
We already use HTTPS exclusively for wiki, bugs, forums, etc. and we have it available for our other sites, so link only to the https:// protocol locations when pointing users at other sites. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-03Include category when linking to bug reportsDan McGee
Also change the default category to something legit. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-12Protect urlencode calls against Unicode dataDan McGee
These would cause page errors if passed anything not in the ASCII character set. This change allows for packages to have names composed of any Unicode characters, not just those in the ASCII set. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-06Encourage bug reports to have a summaryDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-11PyLint suggested cleanupsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-03Convert packager link to search by packagerDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17Display package URLs unquoted if possibleDan McGee
Example: kbd-ru-keymaps. Before: http://wiki.archlinux.org/index.php/%D0%98%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%B0%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F After: http://wiki.archlinux.org/index.php/Интернационализация Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01Use package branches to display commit historyEvangelos Foutras
We now have one link pointing to the tree of /trunk, and another pointing to the log of /trunk. Both links specify a package branch. Signed-off-by: Evangelos Foutras <evangelos@foutrelis.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19Ensure ampersands are properly escaped in hrefsDan McGee
This was pointed out by the W3C validator. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16add "search wiki" link to package details pageSergej Pupykin
Dan: fix usage of urlencode() function. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09Add a template tag to link multiple packages at onceDan McGee
Comma-separated list. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09Add package details link tagDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18Reimplement links code as template tagsDan McGee
These were starting to get a bit too much inside the model itself, and they don't really belong there as they are view layer concerns anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-13Ensure PyPy compatibilityDan McGee
Unfortunately I was relying on all python environments having this method defined, which is not true yet. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-07Clean up current_query and preserve multiple argsDan McGee
When implementing search for multiple architectures or repositories, I didn't update this method to accomidate the new query parameters. Clean it up a bit by not appending/stripping the leading '?' anywhere but in the template itself, and ensure we can handle multiple of any parameter passed in. Fixes FS#23180. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-13Make userpkgs a simple_tagDan McGee
Cleans up the code a decent amount. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-04Add a title to the userpkgs linkDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-28Add new 'userpkgs' template tagDan McGee
For easy linking to a given person's packages when we have a user object. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17Kill td_input template and tagDan McGee
2008-10-11drop some unused templatetagsDusty Phillips
2008-10-07trying to flesh out the pageDusty Phillips
2008-10-07replace package search with a nonfunctional newformDusty Phillips
2008-10-07move validation template tage temporarily; it will be removed eventuallyDusty Phillips
2008-06-19sort last updated descending by default. FS#10703Dusty Phillips
2007-12-29Massive retab fest.eliott
Also added vim command comment to the end of files.
2007-11-03Initial import for public release...eliott
Special Note Prior to git import, approx 90% of the code was done by Judd Vinet. Thanks Judd!