Commit Graph

13 Commits

Author SHA1 Message Date
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
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
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
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
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
8e49392398 Render dependency checklist within submit form template
Previously I had added a custom widget to handle this, but it turns out
it's not flexible enough - we want to style items individually (not done
yet) and reorder checked items to the top on refresh (done).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 17:50:43 +00:00
Paul Eggleton
cbeba65dac Use scrolling list of checkboxes for dependencies on submit form
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-25 11:03:54 +00:00
Paul Eggleton
3964071e9d Use a formset in submit layer form to handle maintainers
Formsets allow us to have separate fields for name/email for each
maintainer, as well as being able to collect the responsibility field
value. Also split the form to be output field-by-field to allow styling.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-25 11:03:32 +00:00
Paul Eggleton
355c92cfe7 Add mailing list field to layer
Enable recording the mailing list associated with each layer, if any.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-23 23:48:06 +00:00
Paul Eggleton
6cd47bdd82 Handle web interfaces with different URL schemes
Some git web interfaces use different paths for files (blobs) and
directories when it comes to browsing; this means we need to have a
separate field for the base URL for files.

Additionally, Gitweb typically puts the path within the URL instead of
at the end (although the parameters can be reordered) and cannot handle
the file parameter (f=) being specified with no value. So, to add some
flexibility, add the ability to use a positional macro %path% to
optionally specify where to put the path. If needed, square brackets
can be used in conjunction with %path% to exclude parts of the string
when there is no path, i.e. we want to browse the root. For example, the
following base URL:

  http://git.example.com/?p=somerepo.git;a=tree;[;f=%path%];hb=HEAD

would be translated to this with a path of "path/to/dir":

  http://git.example.com/?p=somerepo.git;a=tree;f=path/to/dir;hb=HEAD

and this if no path were specified:

  http://git.example.com/?p=somerepo.git;a=tree;hb=HEAD

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-23 20:33:24 +00:00
Paul Eggleton
eebbcf66c1 Fix validation to allow blank web tree start URL
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-14 07:26:52 +00:00
Paul Eggleton
2eb5f38b21 Initial commit of layerindex-web
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-13 12:09:57 +00:00