Commit Graph

100 Commits

Author SHA1 Message Date
Paul Eggleton
d3b061f247 Sort layer list by layer type first
The old layer index was sorted first by layer type so let's do the same
here.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00
Paul Eggleton
f17c5cf04f Move fetch dir calculation to model
This makes it easier to get this directory name outside of the update
script.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00
Paul Eggleton
3cc0b78935 update.py: create dependency/maintainer records when creating LayerBranch
If we're creating a LayerBranch record, it's helpful to copy the
maintainer and dependency records in from master as they're usually
going to be the same; if they're not the user can always change them
afterwards.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00
Paul Eggleton
0a1215e59e Move repo subdirectory to layerbranch
So it turns out that one or two layers have changed in structure between
branches, so we need to be able to specify this on a per-branch basis.
Good times...

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00
Paul Eggleton
ee9176a8c5 Ensure bad URL within layerindex app returns 404
The recently added global redirect was also redirecting incorrect URLs
within the application to the front page rather than showing 404, which
is not desirable.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-18 16:29:50 +00:00
Alexandru DAMIAN
a5f6ecb914 Added activation_complete template
When clicking on an activation link, after verification,
the registration application tries to show
the activation_complete page. The template was missing,
so I added a basic skeleton.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-03-08 16:37:30 +00:00
Alexandru DAMIAN
dd158da456 Blocktrans can't take other url blocks
Modified the email body to break the blocktrans
into two separate blocks, and not include the
url block inside the blocktrans block.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-03-08 16:37:25 +00:00
Alexandru DAMIAN
b483dcf2af Redirects unknown URLs to the default application
It's bad form to show the user a Page Not Found on
the first site open, so we redirect to the default
application.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-03-08 16:30:51 +00:00
Paul Eggleton
af499c0d99 Add sort priority field to branch model
This enables sorting the branch drop-down in a configurable manner (e.g.
so that you can have them in order from newest to oldest).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 22:56:31 +00:00
Paul Eggleton
f6fb84db4b README: clarify in licensing section that Bootstrap includes Glyphicons
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:33:46 +00:00
Paul Eggleton
d2e4f6d322 TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:24:43 +00:00
Paul Eggleton
4faeab6595 Add introductory front page
Give the user a friendly introduction instead of plunging them straight
into the layers list. (Of course if people want to link directly to the
layers list they still can.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:13:49 +00:00
Paul Eggleton
a643aeba33 Add separate templates for review list and detail
This cuts out a lot of the elements that aren't needed for the review
list, shows fields in a more suitable way for review purposes than the
standard detail (and includes some fields that don't currently get shown
on the standard detail e.g. layer type and short description).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:13:44 +00:00
Paul Eggleton
fecc907687 Ensure we switch to the master branch for reviewing
Newly submitted layers don't have anything other than a master branch,
so they won't display properly unless we have master selected; so just
add a parameter to submission email and review URLs to ensure that is
the case.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 19:15:39 +00:00
Paul Eggleton
4be747582f Add a short description for branches to show in drop-down
Allows you to add e.g. "old stable" next to the denzil branch for
clarification.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 18:31:02 +00:00
Paul Eggleton
94ff843006 update.py: ensure script can be run from any directory
Don't assume the current directory contains our conf/local.conf,
explicitly use the directory above where the script is located.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 18:08:05 +00:00
Paul Eggleton
df76a64d95 update.py: avoid writing bitbake.lock/cache to current directory
Create a temporary directory for these files.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 18:07:56 +00: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
919eb20119 README: Clarify requirements
* Add tested versions
* Web server only needed for production

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 16:55:28 +00:00
Paul Eggleton
0c7dcedca6 Use TemplateView for simple views instead of custom functions
The simple views for about and the submit thanks pages don't need
special views, so the standard TemplateView can be used.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 16:55:28 +00:00
Paul Eggleton
b3afd4f2fd Add catchall 404 URL if nothing else matches
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 16:55:28 +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
Paul Eggleton
5308e03c9e Add django-simple-captcha to list of modules on about page
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 15:43:38 +00:00
Paul Eggleton
46e579b6e6 Show count of layers to be reviewed next to Review link
Add a badge next to the Review link (when shown for users with the
publish permission) on all pages showing how many layers need to be
reviewed, if any.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 09:16:19 +00:00
Paul Eggleton
fea42407fb Focus first input field on all login/registration forms
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 20:37:49 +00:00
Paul Eggleton
3f967cf751 Allow usage URL to point to a file within the repository
This means the usage URL can point to a file whose contents may be
different per branch (e.g. a README file).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 20:37:49 +00:00
Paul Eggleton
354e368aa2 Add support for handling multiple branches
Change the data structure to support multiple branches. At the top level
there is a set list of Branch objects, and then a LayerBranch object
between each layer and the maintainers, dependencies, recipes and
machines, so that the set of each can be different per branch. The
branch is a session option, and can be selected via a drop-down that is
shown for all pages.

Additionally, with this change we avoid the need to run the update
script within a build environment set up with oe-init-build-env - since
we need a specific version of BitBake per branch we now use our own copy
of BitBake which is fetched by the script itself. The update script will
need to be called multiple times however - once per branch.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 20:37:48 +00:00
Paul Eggleton
0d52678697 Remove remnant of previous status filtering from layer list view
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 11:07:17 +00:00
Paul Eggleton
8a81235dba Filter out current layer from dependencies list in edit form
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 11:07:17 +00:00
Paul Eggleton
4399652268 README: add note about setting DEBUG
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 17:31:02 +00:00
Paul Eggleton
b3e5c460f8 Add simple 404 and 500 error templates
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 17:30:49 +00:00
Paul Eggleton
2ad289e312 Fix static pathing to use staticfiles
This is the recommended best practice.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 16:58:07 +00:00
Paul Eggleton
b3f0569640 Rename SubmitLayerForm class to EditLayerForm
Remain consistent with other naming.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 15:55:23 +00:00
Paul Eggleton
aa1dd0b822 Remove unneeded useredit variable from edit_layer_view
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 15:54:59 +00:00
Paul Eggleton
4b3aad2cea Add CAPTCHA to submission form
This should prevent spamming even though this is less likely with this
kind of site.

The CAPTCHA does not show when editing, only submitting, and is also not
shown for authenticated users.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 15:48:38 +00:00
Paul Eggleton
482abdcc8a Submit/edit form tweaks
* Don't specify action on form - this is best practice and avoids the
  need to have separate form tags for submit and edit
* Add a short introduction to the submit form
* Focus first field on load only if first field is empty (avoids doing
  this focusing on the edit form which is not really useful).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
a8ae70a600 Remove Submit layer link when on submit/edit pages
This avoids changes being accidentally lost when either editing or
submitting a layer.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Belen Barros
f178ea3151 Styles for the submit layers form
Improve styling and layout

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
0e14cf17d8 Hide extra maintainer forms and show each one on request
Hide all empty maintainer forms and have a button to "add" another
maintainer which just uses jQuery to show the next hidden form. Up to
10 maintainers can be added which should be more than enough.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
9a3bfac320 Add ability to delete unpublished layers
If we get bogus or duplicate entries we'll want the ability to delete
them easily before publishing (without needing to have access to the
admin interface), so add this ability. Being able to delete a published
layer might be a bit dangerous and is less likely to be needed so that
is disallowed for now.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
26ab9dbb28 Add ability to add, edit and delete layer notes
This allows adding an important notice to a layer e.g. "this layer is
deprecated, please use layer xyz instead". Only one layer note can be
added through the interface although the data structures allow multiple,
so notes may be added programmatically without disturbing user-added
ones.

With this change we also add a get_absolute_url() function to the
LayerItem model and change the calls to reverse() for layers to use it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
e6d7b215a6 Allow setting active/inactive maintainer status when editing layer
If editing rather than submitting we want users to be able to make an
existing maintainer inactive.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 23:10:34 +00:00
Paul Eggleton
ad5e8f0524 Clarify language around publishing layers
Show "unpublished" rather than "new" in dependencies list in submit
form, and mention publishing as the operation in the "thanks for
submitting" page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 23:10:28 +00:00
Paul Eggleton
3f60b3fba3 Improve detail page for unpublished layers
* Add a label making it clear the layer is unpublished
* Hide recipes list header since there should never be any recipes (as
  the update script doesn't process unpublished layers)
* Add test links for base URLs

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 12:10:49 +00:00
Paul Eggleton
47981c57ad Add edit form template missing from last commit
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 10:57:19 +00:00
Paul Eggleton
c40bfedd4a Implement editing of layers
Allow users with publish permission to edit any layer, and users with
the same email address as one of the maintainers of a layer to edit that
layer.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 10:34:02 +00:00
Paul Eggleton
1e3f451139 Fix Publish Layer button on layer detail
Show button only if user has appropriate permission, and remove the
duplicate button at the end of the page as it's unlikely to be useful.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 23:40:12 +00:00
Paul Eggleton
89d4f9ea6b Don't show last commit date on layer detail if field is null
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 22:38:44 +00:00
Paul Eggleton
88ada21861 Prevent users without publish permission from viewing unpublished layers
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 22:36:39 +00:00
Paul Eggleton
4ff01679ce More TODO list updates
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 19:16:35 +00:00