aboutsummaryrefslogtreecommitdiff
path: root/templates
Commit message (Collapse)AuthorAge
* templates: Use 'en' localeStephen Finucane2019-11-30
| | | | | | | | | | | | As discussed at [1], the UI was originally written in Australian English but as it's been through a couple of pairs of hands since the chances are things are more than a little messed up. Just use 'en' as our locale rather than 'en-US', 'en-AU' or anything else. [1] https://lists.ozlabs.org/pipermail/patchwork/2019-November/006342.html Signed-off-by: Stephen Finucane <stephen@that.guru> Suggested-by: Daniel Axtens <dja@axtens.net>
* Disable i18n machinery, use correct localeStephen Finucane2019-11-30
| | | | | | | | | | | | | | | | | | | | | Two issues here. Firstly, the use of the 'USE_I18N'. The Django docs describe this as such: A boolean that specifies whether Django’s translation system should be enabled. This provides an easy way to turn it off, for performance. If this is set to False, Django will make some optimizations so as not to load the translation machinery. We don't do translations and won't until such a time as someone comes asking for them. Optimize things accordingly by setting 'USE_I18N' to False and removing the now-unnecessary 'LANGUAGE_CODE' setting. Secondly, the use of en-AU is a bit of a lie since our UI is actually written in US English (or should be). The primary reason for a lang tag to be present is to assist screenreaders and other accessibility tools, so make their lives easier by reflecting the truth. Signed-off-by: Stephen Finucane <stephen@that.guru>
* templates: Specify languageAndrew Donnellan2019-11-05
| | | | | | | Specifying language in the <html> tag is recommended in HTML5. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Daniel Axtens <dja@axtens.net>
* templates: Get rid of type attribute in script tagsAndrew Donnellan2019-11-05
| | | | | | | | | | | In HTML5, the type attribute of a script tag is optional if it's JavaScript. Remove all occurrences. The only real gain is slightly smaller page output, but it also shuts up validators that like to be noisy about this. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Daniel Axtens <dja@axtens.net>
* templates: Use 'static' rather than 'statictags' libraryAndrew Donnellan2019-09-14
| | | | | | | | statictags is being renamed to static, use of {% load statictags %} is deprecated and will break in Django 3. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Daniel Axtens <dja@axtens.net>
* htdocs: Add clipboard.jsStephen Finucane2017-06-14
| | | | | | | | | | We provide our own, much smaller implementation of this currently. However, we want to be able to implement slightly different variants of this elsewhere and using an existing library helps avoid reinventing the wheel and lets us use already battle-tested code. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
* templates: Add Patchwork versionStephen Finucane2017-03-01
| | | | | | | | | | | | This is managed using a combination of hardcoded string, for installations from tarball, and 'git describe', for installations from a Git repo. This includes installing Git in the Docker environment, to enable this in the development environment. Signed-off-by: Stephen Finucane <stephen@that.guru> Acked-by: Daniel Axtens <dja@axtens.net>
* urls: Move 'help/about' to 'about'Stephen Finucane2017-03-01
| | | | | | | | | | | This is the standard URL for such pages. This involves removing the pwclient help page, but this is migrated to the project summary page and detailed in the documentation. Permanent redirects are included to prevent dead links. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net>
* templates: Fix spelling mistakes and typosEric Engestrom2016-05-09
| | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Add user bundle link into the dropdown menuStephen Finucane2016-04-01
| | | | | | | | | Since the link to TODOs (reviews pending) can already be seen there, it makes sense to link to bundles also. A divider is added to logically group these elements. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Cleanup the navbar "brand"Stephen Finucane2016-04-01
| | | | | | | | | | | | | | | | | | The text shown in the top-left corner of a navbar, known as the "brand" in Bootstrap parlance, normally brings you to the homepage. However, when viewing patches or details about a project this name of this project is included in this link. This gave some users the idea that clicking this button would return them to the project patch list instead. To resolve this confusion, break the project name and any other non-Patchwork title out of this clickable link. A new "navbar-subnav" style is introduced to do this, seeing as Bootstrap does not appear to support something like this natively. Once this is done, this also allows for the removal of the "All Projects" button, which both duplicates this functionality and did nothing when there was only one project available on an instance. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* templates: Use 'Patchwork' consistentlyStephen Finucane2016-03-29
| | | | | | | The templates referred to both 'patchwork' and 'Patchwork'. Use the title case variant consistently. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* views: Use messages framework in 'patch'Stephen Finucane2016-03-25
| | | | | | | | | | | | | | | | | | Django provides the messages framework as part of the core library. This framework allows for "toast"-style notifications to the user, for things like post-form processing notifcations. At the moment patchwork provides this functionality using custom code. However, this code is not well tested and, like any code, incurs some degree of maintenance overhead. It would be easier to use the "batteries" that Django provides so begin doing just that. This change only covers one of two places in which this custom messages framework is currently used. By extension, it also covers one of the two places in which 'render_to_response' is still used. This "other place" will be addressed in a follow-up commit. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> Tested-by: Andy Doan <andy.doan@linaro.org>
* js: Allow shift-select of checkboxesStephen Finucane2016-03-15
| | | | | | | | | | Allow bulk modification of patches through shift-select of the check boxes on each line. This allows for the removal of the 'common.js' file, which was only being used in one location. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Make the project a unit with 'Patchwork' in the menu barDamien Lespiau2016-02-08
| | | | | | Both should be styled the same and be a link to the home page. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
* ui: Make "All Projects" on the main page consistent with the restDamien Lespiau2016-02-08
| | | | | | | | The pages we're on are now represented with a little icon and active. Make the one on the main page look like the rest. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Put the project name by default on project pagesDamien Lespiau2016-02-08
| | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Switch to HTML5 doctype and fix issuesDamien Lespiau2016-02-08
| | | | | | | | | | | | | A few common things: - Remove the 'role' attribute of <nav> - Don't use the self closing syntax ('/>') on non void elements - Don't use the language attribution in <script> - Remove spurious attributes - The 'check' attribute of <input> doesn't take any value Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Merge the TODO list into the user dropdownDamien Lespiau2016-02-08
| | | | | | | | | We still leave the badge on the top bar so we can see, at a glance, the number of items on the TODO list. The actual menu item is folded into the dropdown. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Merge the admin link into the user dropdownDamien Lespiau2016-02-08
| | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Use bootstrap container-fluid classDamien Lespiau2016-02-08
| | | | | | | | It's time to use more of Boostrap. Having the top level element use the framework makes the rest work. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Redesign navigationDamien Lespiau2016-02-08
| | | | | | | | | | | | We get rid of the breadcrumbs in favour of items always present in the top navigation bar. Based on Bélen's new design iteration. v2: Rebase onto master Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* ui: Let the bootstrap inverse navbar style shine throughDamien Lespiau2016-02-08
| | | | | | | | | | | | | Time for another iteration of the design. Let's start by using the inverse bootsrap style with a slightly whiter color for font for better contrast. That color change has repercussions in the style sheet, mostly in the custom containers/boxes we're still using on the secondary pages (login/register/...) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* Use URL names in place of Python pathsStephen Finucane2016-01-19
| | | | | | | | | | | Reversing by Python paths has been deprecated in Django 1.8, causes warnings in Django 1.9 and will be removed in Django 2.0. Resolve the warnings and prevent issues in the future by referring to URLs by name, rather than by Python path. https://docs.djangoproject.com/en/1.9/releases/1.8/#passing-a-dotted-path-to-reverse-and-url Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* views: Split up 'base'Stephen Finucane2016-01-19
| | | | | | | | This is a collection of unrelated functions, many of which belong in their own file. Do this, taking the opportunity to rename some of these functions to better indicate their purpose in the process. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* login: add link to password resetaldot2015-11-21
| | | | | | | | | | | | | Refurbished version from 2010 Doesn't mention the username in the mail but in the confirmation step. Essentially the templates are all optional but they do look better (and more integrated in patchwork) than the default django admin thing. No testing beyond some bored clicking here and there. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* base: Don't put the logout button in the is_staff blockDamien Lespiau2015-11-05
| | | | | | | Regular users didn't have their logout/profile drop down! Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* base: Use a Bootstrap badge for the number of todo itemsDamien Lespiau2015-11-05
| | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* base: Capitalize the menu items in the navbarDamien Lespiau2015-11-05
| | | | | | v2: Rebase on top of the "Project Info" renaming Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
* base: Group username/profile/logout with a dropdownDamien Lespiau2015-11-05
| | | | | | | | We regoup user related information (log out and profile) in a dropdown with the user identity as label. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* patch-list: Make the table header stickyDamien Lespiau2015-11-05
| | | | | | | | | So, when scrolling down the list of patches, we still get what are the field displayed. This is espacially important as I plan to add a few more. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* base: Add selectize to the base templateDamien Lespiau2015-11-05
| | | | | | | The only tricky thing is the inclusion of the EcmaScript shim for IE8. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* style.css: Rename the breadcrumb selectorsDamien Lespiau2015-11-05
| | | | | | | | | Bootstrap called what was the header bar "navigation". Let's rename the nav* selector with 'breadcrumb' so there's no confusion with bootstrap's nagivation elements and selectors. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* html: Turn the navbar into a breadcrumb barBelén Barros Peña2015-11-05
| | | | | | | | | | | | | | | | | | | | | | So we can have a somewhat of a hierarchical progression: All projects -> $project patches -> patch name That should also help when we add series, we'll be able to just add the series in there. By default, we have: All projects -> $project patches both being links, so we can return to the list of patches from any page where the project is defined. The '$project patches' link becomes insensitive in the list page. Finally the patch page adds the patch at the end. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* base: Don't display the breadcrumb bar on the project list pageDamien Lespiau2015-11-05
| | | | | | | We already have the information on the main bar, no need to have a breadcum bar here. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
* base: Move the project info into the navigation barDamien Lespiau2015-11-05
| | | | | | | | | The goal is still to have a proper breadcrumb bar. One more little step towards it. v2: Rename "About ${project}" to "Project Info" (Stephen Finucane) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
* templates: Remove extraneous blank line at the end of base.htmlDamien Lespiau2015-11-05
| | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* templates: Move "About" at the bottom of the pageBelén Barros Peña2015-11-05
| | | | | | | | | | This is part of the steps needed to make the "nav" bar into a pure breadcrumb trail. It's quite usual these days to have "about" style links at the bottom of pages. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* templates: Redesign the title barDamien Lespiau2015-11-05
| | | | | | | | | | | | | | | | | | | Let's use HTML5 <nav> and bootstrap navigation facilities for this. Among the nice things that bootstrap brings to the table, the navigation bar is now mobile friendly: it will collapse when either, being displayed on a mobile device or when the screen isn't wide enough, to show the various items in a togglable menu. This can be tested by resizing the browser to have a width < 768px. This commit is just about layout changes, keeping the exact same information displayed on the page. This is based on work from Belén Barros Peña, but transposed to bootstrap. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* template: Add bootstrap to the base templateDamien Lespiau2015-11-05
| | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
* templates: Pull jquery into base.htmlDamien Lespiau2015-09-18
| | | | | | | | Bootstrap needs jquery for its own JS facilities, so include it on every page. Acked-by: Stephen Finucane <stephen.finucane@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
* trivial: Remove dead files/codeStephen Finucane2015-09-17
| | | | | | | | | | | | Remove some swathes of code that are no longer used, some of which contains issues that renders them useless. This unused code was initially discovered by using 'coverage.py' followed by manual inspection. Acked-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
* Move to a more recent django project structureJeremy Kerr2015-05-27
| | | | | | | | | | This change updates patchwor to the newer project struture: we've moved the actual application out of the apps/ directory, and the patchwork-specific templates to under the patchwork application. This gives us the manage.py script in the top-level now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Integrate 'django.contrib.staticfiles'Stephen Finucane2015-05-03
| | | | | | | | | | Rather than providing a custom solution for serving static files, use the solution provided in the upstream Django source. This allows us to remove the top-level 'urls.py' file. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Resolve removed 'AUTH_PROFILE_MODULE' settingStephen Finucane2015-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'AUTH_PROFILE_MODULE' setting, and the 'get_profile()' method on the 'User' model are removed in Django 1.7. This causes errors when using Patchwork with Django 1.7+. There are three changes necessary: * Replace profile model's 'ForeignKey' with a 'OneToOneField' * Remove all 'get_profile()' calls * Delete 'AUTH_PROFILE_MODULE' settings from 'settings.py' These changes are discussed here: http://deathofagremmie.com/2014/05/24/retiring-get-profile-and-auth-profile-module/ Django 1.6 also introduces two other notable changes: * The 'XViewMiddleware' module has been moved * A new test runner has been introduced It is not possible to fix these issues without breaking compatibility with Django 1.5. As a result they have been ignored and must be resolved in a future release. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Make the submitter name link to a query for that submitterMichael Ellerman2015-05-03
| | | | | | | | | | | | | | | | | | | | | | Currently the submitter name is rendered as a mailto: link. This is possibly useful in some circumstances, but in my experience is not usually what I want. Although it opens a mail to the submitter, it doesn't include any of the patch context, so is not very helpful. Instead the submitter link can be a link to a query for patches by that submitter. In my experience that is more useful, ie. when looking at a single patch for a submitter you can then quickly get the list of all patches by them. So do that conversion. In order to do it we need to know the current project, so that becomes a parameter to personify. I believe the url reversal is correct, though it's not pretty, and pulling SubmitterFilter.param out feels a little wrong, but is the best solution I could come up with. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: fixup HTML tagsBrian Norris2014-07-04
| | | | | | | | | | These tags aren't matched appropriately. There may well be others, but I caught these by a mix of eyes and Firefox's source viewer. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pwclient: accept more than one project in ~/.pwclientrcYann E. MORIN2014-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, given the format of ~/.pwclientrc, pwclient can only really act on a single project, as ~/pwclientrc can only contain the configuration for a single project. Although the -p options comes in handy to specify a project different from the one configured in ~/.pwclientrc, this only works if it is hosted on the same server. As soon as one needs to switch server, it is necessary to edit ~/pwclientrc. This can be quite inefficient when dealing with many projects, hosted on different servers. Change the format of ~/.pwclientrc so it is possible to define more than one project, and for each project, specify an URL and credentials. The new format is like: [options] default = project-A [project-A] url = http://my.patchwork.server/path/to/xmlrpc username = that-is-me password = secret [other-project] url = http://you.get/the/idea username = someone password = 1234 This has the advantage of not changing the options to pwclient, so the user experience is unmodified. If a ~/.pwclentrc exists in the old format, it is automatically converted over to the new format, and the previous one is saved as ~/.pwclientrc.orig. Upon conversion, no action is made, pwclient just exits (with return-code 1) to inform the user to review the conversion. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: display projects as inline-block elementsJeremy Kerr2014-05-07
| | | | | | ... rather than one long list. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Django 1.5 compatibility fixesRalf Baechle2013-10-13
| | | | | | | Django 1.5 wants plenty of quotes scattered over the templates. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>