Refined the appearance and wording of the 'Manage document's adoption' button.

- Legacy-Id: 13680
This commit is contained in:
Henrik Levkowetz 2017-06-19 18:09:33 +00:00
parent e4fc7f0055
commit 5e6ecfbaf5
3 changed files with 44 additions and 2 deletions

View file

@ -1,3 +1,40 @@
ietfdb (6.55.1) ietf; urgency=medium
This is a bugfix release, with some smaller enhancements. From the commit
log:
* Don't deliver spurious yang extraction errors for drafts where no yang
modules were found.
* Replaced the use of unaccent.asciify(), which has similar functionality
as unidecode.unidecode(). Changed the draft parser to work exclusively
with unicode text, which both makes the removal of unaccent easier, and
takes us closer to Py35 compatibility. Adjusted callers of the draft
parser to send in unicode.
* Removed code which has been marked as unreachable since February/March
2017 and has not triggering any usage indications.
* Changed the display of people with roles on the various group pages to
link to both their profile page and their email address.
* Improved the handling of surname particles, (prompted by failure to
handle the name of Niels ten Oever correctly).
* Made changes to the can_adopt_draft() logic, to make it possible for a
chair of multiple groups to correct the mistake if adoption was made for
the wrong group.
* Merged in [13615] and [13627]from rcross@amsl.com:
Changed views that use GET requests to delete objects to use POST.
Fixes #1796.
* Make sure wordwrap() and friend works as intended if they are used as
template filters and given string arguments.
-- Henrik Levkowetz <henrik@levkowetz.com> 17 Jun 2017 14:16:17 -0700
ietfdb (6.55.0) ietf; urgency=medium
**Improved Yang validation support**

View file

@ -113,7 +113,7 @@ def can_adopt_draft(user, doc):
role_groups = [ r.group for r in roles ]
return (doc.stream_id in (None, "ietf", "irtf")
and (doc.group.type_id == "individ" or doc.group in role_groups)
and (doc.group.type_id == "individ" or (doc.group in role_groups and len(role_groups)>1))
and roles.exists())
def two_thirds_rule( recused=0 ):

View file

@ -321,7 +321,12 @@ def document_main(request, name, rev=None):
actions = []
if can_adopt_draft(request.user, doc) and not doc.get_state_slug() in ["rfc"] and not snapshot:
actions.append(("Manage Document Adoption in Group", urlreverse('ietf.doc.views_draft.adopt_draft', kwargs=dict(name=doc.name))))
if doc.group:
# already adopted in one group
button_text = "Change Document Adoption to other Group"
else:
button_text = "Manage Document Adoption in Group"
actions.append((button_text, urlreverse('ietf.doc.views_draft.adopt_draft', kwargs=dict(name=doc.name))))
if doc.get_state_slug() == "expired" and not resurrected_by and can_edit and not snapshot:
actions.append(("Request Resurrect", urlreverse('ietf.doc.views_draft.request_resurrect', kwargs=dict(name=doc.name))))