Commit Graph

13 Commits

Author SHA1 Message Date
Tim Orling
bd58fbe7df bootstrap_pagination: disable via comment
Wrap the is_pagination usage of bootstrap_pagination with comment/endcomment
to avoid incompatible module.

We will need to re-write the pagination code.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 20:09:12 -07:00
Paul Eggleton
f527692c7c Replace custom pagination with django-bootstrap-pagination
Simplify things a bit. We lose the digg-style pagination but the new
behaviour is good enough and improves maintainability.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
6fcf44fcc7 Ensure browse buttons clear input text
On the machines/distros/classes pages, if you type a keyword and then
click "search", and there are no matches, then you click on "browse",
there shouldn't be any search text in the box anymore because you're
viewing all items, so use a bit of javascript to ensure that.

While I'm at it, set reasonable ids for the search field on each page
(including the recipes page, although there is no browse button there so
that is just for consistency).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-26 16:35:45 +12:00
Paul Eggleton
a4212901b1 Select input box on machine/distro/class pages
If there are no search results, focus the search input field and select
any text in it so that the user can just start typing a keyword
immediately.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-26 16:21:49 +12:00
Paul Eggleton
517424dc81 Upgrade to Bootstrap 3
Use a more modern version of Bootstrap and take the opportunity to
upgrade jQuery to the latest version at the same time. This provides
better browser compatibility, moves to MIT license, allows us to make
the site more responsive for different devices in future, and provides
theming capabilities for custom installs among other improvements.

(I chose to upgrade to v3 for now rather than straight to v4 as it was
easier to do this gradually.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-20 15:57:59 +12:00
Amanda Brindle
a64bfed81b recipes.html: Require keyword for recipe search
Use JavaScript to check if the search box for recipe search is
empty before querying the database. This will prevent the "502
Bad Gateway" error that occurs when the query takes too long due
to the large list of recipes. Since there are so many recipes
spread across the layers in the OE index, there's no point in
allowing a user to search without a keyword in order to browse
the list; it simply isn't digestible as a whole.

For the Machines, Classes, and Distros pages, the search behaviour is
unaffected, however to make it more obvious that you can browse the list
add an explicit "browse" button.

Fixes [YOCTO #11930]

Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-12-05 10:01:10 +13:00
Amanda Brindle
78c2561181 templates/layerindex/classes.html: Add bbclass search
Add another tab to search for classes.

Fixes [YOCTO #11207]

Signed-off by: Amanda Brindle <amanda.r.brindle@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-07 16:54:46 +13:00
Liam R. Howlett
31c85196d0 layerindex: Add distro to web interface and model
Add the distros to the index.  This looks a lot like the machines
and allows users to search for a particular distro.

Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com>

Added associated migration.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2016-10-18 16:42:15 +13:00
Paul Eggleton
82c632ca2d Upgrade to Django 1.6+
I'd like to be upgrading to 1.8 but that causes problems with South, and
we're not quite ready to dispense with our existing migrations yet.

Part of the implementation for [YOCTO #9620].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Paul Eggleton
1643aef67d Navigation improvements
* Drop the front page - this just gets in the way. Redirect to the
  layers list instead. This has meant adding a touch more text to the
  about page and adding the FAQ link to the footer.
* Use a separate navbar to hold the branch selector and the main
  top-level  pages (Layers, Recipes, Machines) instead of tabs
* All pages depending on a branch selection are now under
  branch/<branchname>/ so we don't need to have the branch selection on
  every page.
* Use breadcrumbs on recipe detail and layer detail pages instead of
  tabs
* Add title to recipe detail page

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-05 00:31:23 +01:00
Paul Eggleton
413c1ffb7a Change tab titles to match front page buttons
"Layer index" -> "Layers", "Machine index" -> "Machines", etc.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
445b17d3cf Use appending to extend page title instead of overriding it
This means there is only one place to set the base title instead of
needing to change it in every template.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 17:23:36 +00:00
Paul Eggleton
93be8b1172 Move all templates to a templates directory
This should allow the templates to be found and swapped out more easily.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 16:55:23 +00:00