Merge lp:~rockstar/launchpad/fix-bmp-links into lp:launchpad

Proposed by Paul Hummer
Status: Merged
Approved by: Paul Hummer
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~rockstar/launchpad/fix-bmp-links
Merge into: lp:launchpad
Diff against target: 107 lines
3 files modified
lib/lp/code/browser/branchmergeproposal.py (+6/-5)
lib/lp/code/stories/branches/xx-branch-merge-proposals.txt (+5/-5)
lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt (+10/-0)
To merge this branch: bzr merge lp:~rockstar/launchpad/fix-bmp-links
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+12384@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) wrote :

This branch just moves some links on the Branch Merge Proposal page back
inline with the page. There was some confusion on what counted as a "global
action" and so these links were moved into the navigation menu. They have
been moved back inline now.

I also took the liberty of reordering the menu links so that "Delete" is last
in the list, to go better with the Branch page.

Cheers,
Paul

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks fine. No page tests to change?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/code/browser/branchmergeproposal.py'
2--- lib/lp/code/browser/branchmergeproposal.py 2009-10-09 04:15:55 +0000
3+++ lib/lp/code/browser/branchmergeproposal.py 2009-10-12 17:44:20 +0000
4@@ -228,8 +228,7 @@
5 usedfor = IBranchMergeProposal
6 title = 'Edit Proposal'
7 facet = 'branches'
8- links = [
9- 'edit_status', 'edit_commit_message', 'delete', 'resubmit']
10+ links = ['resubmit', 'delete']
11
12 @property
13 def branch_merge_proposal(self):
14@@ -242,11 +241,13 @@
15
16 usedfor = IBranchMergeProposal
17 links = [
18- 'request_review',
19 'add_comment',
20+ 'dequeue',
21+ 'edit_commit_message',
22+ 'edit_status',
23+ 'enqueue',
24 'merge',
25- 'enqueue',
26- 'dequeue',
27+ 'request_review',
28 'resubmit',
29 'update_merge_revno',
30 ]
31
32=== modified file 'lib/lp/code/stories/branches/xx-branch-merge-proposals.txt'
33--- lib/lp/code/stories/branches/xx-branch-merge-proposals.txt 2009-09-22 19:04:02 +0000
34+++ lib/lp/code/stories/branches/xx-branch-merge-proposals.txt 2009-10-12 17:44:20 +0000
35@@ -245,7 +245,7 @@
36
37 The edit icon at the end of the status allows the user to edit the status.
38
39- >>> nopriv_browser.getLink('Change status').click()
40+ >>> nopriv_browser.getLink('Edit status').click()
41
42 When marking a proposal as merged there is an optional revision number.
43 If this is set then the when setting the merge proposal as merged the
44@@ -347,7 +347,7 @@
45 proposal. It can only be set to another inactive state like "rejected" or
46 "merged".
47
48- >>> eric_browser.getLink('Change status').click()
49+ >>> eric_browser.getLink('Edit status').click()
50 >>> def print_options(field):
51 ... for option in field.options:
52 ... print option
53@@ -359,7 +359,7 @@
54 work-in-progress.
55
56 >>> eric_browser.open(superseding_url)
57- >>> eric_browser.getLink('Change status').click()
58+ >>> eric_browser.getLink('Edit status').click()
59 >>> eric_browser.getControl(name='field.queue_status').displayValue = (
60 ... ['Merged'])
61 >>> eric_browser.getControl('Change Status').click()
62@@ -370,7 +370,7 @@
63 >>> print_summary(eric_browser)
64 Status: Superseded
65 ...
66- >>> eric_browser.getLink('Change status').click()
67+ >>> eric_browser.getLink('Edit status').click()
68 >>> print_options(eric_browser.getControl(name='field.queue_status'))
69 WORK_IN_PROGRESS
70 NEEDS_REVIEW
71@@ -387,7 +387,7 @@
72 >>> print_summary(eric_browser)
73 Status: Merged
74 ...
75- >>> eric_browser.getLink('Change status').click()
76+ >>> eric_browser.getLink('Edit status').click()
77 >>> print_options(eric_browser.getControl(name='field.queue_status'))
78 WORK_IN_PROGRESS
79 NEEDS_REVIEW
80
81=== modified file 'lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt'
82--- lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt 2009-09-18 23:04:42 +0000
83+++ lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt 2009-10-12 17:44:20 +0000
84@@ -13,6 +13,11 @@
85 tal:content="context/queue_status/title">
86 >
87 Work in progress</span>
88+ <a tal:define="link context/menu:context/edit_status"
89+ tal:condition="link/enabled"
90+ tal:attributes="href link/url">
91+ <img src="/@@/edit" alt="Edit status" />
92+ </a>
93 </td>
94 </tr>
95 <tr>
96@@ -115,6 +120,11 @@
97 replace="structure context/commit_message" />
98 <tal:no-commit-message
99 condition="not: context/commit_message">None</tal:no-commit-message>
100+ <a tal:define="link context/menu:context/edit_commit_message"
101+ tal:condition="link/enabled"
102+ tal:attributes="href link/url">
103+ <img src="/@@/edit" alt="Edit commit message" />
104+ </a>
105 </td>
106 </tr>
107 <tr tal:condition="context/preview_diff">