Closed (fixed)
Project:
Translation Management Tool
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2016 at 12:51 UTC
Updated:
27 Apr 2016 at 07:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
toncic commentedButton has been added to JobItemForm that allows direct abortion of single Job item.
Comment #3
miro_dietikerYou wrongly changed the indentation here. Please revert.
Also your patch contains 7 tabs. See Drupal coding standards and fix.
Wrong indentation and spaces.. Also the button IMHO should be added unconditionally, the key should not be 'abort_job', and #access should check isAbortable() on $item with the conditions above.
The JobItemListBuilder::getDefaultOperations() should also use the new isAbortable().
And finally a test should click this button.
Comment #4
toncic commentedHere are code changes based on review.
Comment #6
johnchqueGood work!, but some small things should be fixed first.
1. One extra space that should not be there, between function and isAbortable()
2. I will vote for '#weight' => 15
3. This can work if first you get to the page, I think it should be 'admin/tmgmt/items/1' and post the form with the 'Abort Item' button.
4. And finally some small white spaces that should not be there :)
Comment #7
toncic commentedRefactored code, bug fixing.
Comment #8
toncic commentedComment #9
johnchqueComment #11
johnchque1. We still have some white spaces.
2. Please use 'Abort Item'
3. This looks fine but instead of hardcoding the id, should concatenate the id of $item4. Also please use a empty array instead of NULL. And finally after that line add a new line below, post again with a NULL path, empty array and 'Confirm' button. :)
Comment #12
johnchqueAnd also it seems that this weight is still too 'light', let's use 20 to improve the UI. :)
Comment #13
toncic commentedI changed test for button and remove white space.
Comment #14
toncic commentedI forgot patch.
Comment #15
johnchqueLooks good. :)
Comment #16
toncic commentedScreenshot of JobItemForm.
Comment #17
miro_dietikerYeah that looks pretty good. But not yet RTBC. :-)
I guess you want to return TRUE.
I would prefer "Abort".
Comment #18
johnchqueDiscussed with @miro_dietiker, it is fine if we use Abort Item. But yes, it should return TRUE if the item is active or if it needs review.
Comment #19
toncic commentedI changed text on button, and change return true instead of isActive(). First I wrote isActive(), because isActive() return 1(true);
Comment #20
johnchqueI like it now :)
Comment #21
miro_dietikerCreated follow-up about merging abort button with save
#2705201: Make abort (item) a link instead of a button
Comment #22
miro_dietikerCommitted, as John proposed, with "Abort Item" variant.