jenkins-bot has submitted this change and it was merged.
Change subject: Wrap topic lock/unlock standalone instance with flow-board div
......................................................................
Wrap topic lock/unlock standalone instance with flow-board div
This will make the original system's initComponent stop complaining
that there is no flow-board. Setting the initial
data-flow-initial-state to "expanded" will make the form load with
initComponent not hiding it.
NOTE: This is a quickfix. The page for lock/unlock topics in nojs
is missing a summary functionality that should also be fixed. This
was filed as a separate bug: T121043
Bug: T120725
Change-Id: Iadf35173ce5c8794df67f0c354b9876db7166d5c
---
M handlebars/compiled/flow_block_topic_lock.handlebars.php
M handlebars/flow_topic_titlebar_lock.partial.handlebars
2 files changed, 59 insertions(+), 55 deletions(-)
Approvals:
Sbisson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/handlebars/compiled/flow_block_topic_lock.handlebars.php
b/handlebars/compiled/flow_block_topic_lock.handlebars.php
index 3cca185..1a7eec7 100644
--- a/handlebars/compiled/flow_block_topic_lock.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_lock.handlebars.php
@@ -31,25 +31,27 @@
'.$sp.'
'.$sp.'>
'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['msg']) && is_array($in)) ?
$in['msg'] : null))) ? ''.LCRun3::ch($cx, 'l10n',
array(array(((isset($in['msg']) && is_array($in)) ? $in['msg'] :
null)),array()), 'encq').'' : ''.LCRun3::ch($cx, 'l10n',
array(array('flow-cancel'),array()), 'encq').'').'</button>
-';},'flow_topic_titlebar_lock' => function ($cx, $in, $sp) {return
''.$sp.'<div class="flow-topic-summary-container">
-'.$sp.' <div class="flow-topic-summary">
-'.$sp.' <form class="flow-edit-form"
data-flow-initial-state="collapsed" method="POST"
-'.$sp.' action="'.((LCRun3::ifvar($cx,
((isset($in['isLocked']) && is_array($in)) ? $in['isLocked'] : null))) ?
''.htmlentities((string)((isset($in['actions']['unlock']['url']) &&
is_array($in['actions']['unlock'])) ? $in['actions']['unlock']['url'] : null),
ENT_QUOTES, 'UTF-8').'' :
''.htmlentities((string)((isset($in['actions']['lock']['url']) &&
is_array($in['actions']['lock'])) ? $in['actions']['lock']['url'] : null),
ENT_QUOTES, 'UTF-8').'').'">
-'.$sp.''.LCRun3::p($cx, 'flow_errors', array(array($in),array()), '
').' <input type="hidden" name="wpEditToken"
value="'.htmlentities((string)((isset($cx['sp_vars']['root']['editToken']) &&
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['editToken'] :
null), ENT_QUOTES, 'UTF-8').'" />
-'.$sp.' <input type="hidden" name="flow_reason"
value="'.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ?
$in['isLocked'] : null))) ? ''.LCRun3::ch($cx, 'l10n',
array(array('flow-rev-message-restore-topic-reason'),array()), 'encq').'' :
''.LCRun3::ch($cx, 'l10n',
array(array('flow-rev-message-lock-topic-reason'),array()), 'encq').'').'" />
-'.$sp.' <div class="flow-form-actions
flow-form-collapsible">
-'.$sp.' <button data-role="submit"
-'.$sp.' class="mw-ui-button
mw-ui-constructive"
-'.$sp.' >
-'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ?
$in['isLocked'] : null))) ? '
'.LCRun3::ch($cx, 'l10n',
array(array('flow-topic-action-unlock-topic'),array()), 'encq').'
-'.$sp.'' : ' '.LCRun3::ch($cx,
'l10n', array(array('flow-topic-action-lock-topic'),array()), 'encq').'
-'.$sp.'').' </button>
-'.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()),
' ').' <small
class="flow-terms-of-use plainlinks">
-'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ?
$in['isLocked'] : null))) ? '
'.LCRun3::ch($cx, 'l10nParse',
array(array('flow-terms-of-use-unlock-topic'),array()), 'encq').'
-'.$sp.'' : ' '.LCRun3::ch($cx,
'l10nParse', array(array('flow-terms-of-use-lock-topic'),array()), 'encq').'
-'.$sp.'').' </small>
-'.$sp.' </div>
-'.$sp.' </form>
+';},'flow_topic_titlebar_lock' => function ($cx, $in, $sp) {return
''.$sp.'<div class="flow-board">
+'.$sp.' <div class="flow-topic-summary-container">
+'.$sp.' <div class="flow-topic-summary">
+'.$sp.' <form class="flow-edit-form"
data-flow-initial-state="expanded" method="POST"
+'.$sp.' action="'.((LCRun3::ifvar($cx,
((isset($in['isLocked']) && is_array($in)) ? $in['isLocked'] : null))) ?
''.htmlentities((string)((isset($in['actions']['unlock']['url']) &&
is_array($in['actions']['unlock'])) ? $in['actions']['unlock']['url'] : null),
ENT_QUOTES, 'UTF-8').'' :
''.htmlentities((string)((isset($in['actions']['lock']['url']) &&
is_array($in['actions']['lock'])) ? $in['actions']['lock']['url'] : null),
ENT_QUOTES, 'UTF-8').'').'">
+'.$sp.''.LCRun3::p($cx, 'flow_errors', array(array($in),array()), '
').' <input type="hidden"
name="wpEditToken"
value="'.htmlentities((string)((isset($cx['sp_vars']['root']['editToken']) &&
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['editToken'] :
null), ENT_QUOTES, 'UTF-8').'" />
+'.$sp.' <input type="hidden" name="flow_reason"
value="'.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ?
$in['isLocked'] : null))) ? ''.LCRun3::ch($cx, 'l10n',
array(array('flow-rev-message-restore-topic-reason'),array()), 'encq').'' :
''.LCRun3::ch($cx, 'l10n',
array(array('flow-rev-message-lock-topic-reason'),array()), 'encq').'').'" />
+'.$sp.' <div class="flow-form-actions
flow-form-collapsible">
+'.$sp.' <button data-role="submit"
+'.$sp.' class="mw-ui-button
mw-ui-constructive"
+'.$sp.' >
+'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ?
$in['isLocked'] : null))) ? '
'.LCRun3::ch($cx, 'l10n',
array(array('flow-topic-action-unlock-topic'),array()), 'encq').'
+'.$sp.'' : '
'.LCRun3::ch($cx, 'l10n', array(array('flow-topic-action-lock-topic'),array()),
'encq').'
+'.$sp.'').' </button>
+'.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()),
' ').'
<small class="flow-terms-of-use plainlinks">
+'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ?
$in['isLocked'] : null))) ? '
'.LCRun3::ch($cx, 'l10nParse',
array(array('flow-terms-of-use-unlock-topic'),array()), 'encq').'
+'.$sp.'' : '
'.LCRun3::ch($cx, 'l10nParse',
array(array('flow-terms-of-use-lock-topic'),array()), 'encq').'
+'.$sp.'').' </small>
+'.$sp.' </div>
+'.$sp.' </form>
+'.$sp.' </div>
'.$sp.' </div>
'.$sp.'</div>
';},),
diff --git a/handlebars/flow_topic_titlebar_lock.partial.handlebars
b/handlebars/flow_topic_titlebar_lock.partial.handlebars
index 9c13fab..bd6aba9 100644
--- a/handlebars/flow_topic_titlebar_lock.partial.handlebars
+++ b/handlebars/flow_topic_titlebar_lock.partial.handlebars
@@ -1,40 +1,42 @@
-<div class="flow-topic-summary-container">
- <div class="flow-topic-summary">
- <form class="flow-edit-form"
data-flow-initial-state="collapsed" method="POST"
- action="
+<div class="flow-board">
+ <div class="flow-topic-summary-container">
+ <div class="flow-topic-summary">
+ <form class="flow-edit-form"
data-flow-initial-state="expanded" method="POST"
+ action="
+ {{~#if isLocked~}}
+ {{~actions.unlock.url~}}
+ {{~else~}}
+ {{~actions.lock.url~}}
+ {{~/if~}}">
+ {{> flow_errors }}
+ <input type="hidden" name="wpEditToken"
value="{{@root.editToken}}" />
+ <input type="hidden" name="flow_reason" value="
{{~#if isLocked~}}
- {{~actions.unlock.url~}}
+ {{~l10n
"flow-rev-message-restore-topic-reason"~}}
{{~else~}}
- {{~actions.lock.url~}}
- {{~/if~}}">
- {{> flow_errors }}
- <input type="hidden" name="wpEditToken"
value="{{@root.editToken}}" />
- <input type="hidden" name="flow_reason" value="
- {{~#if isLocked~}}
- {{~l10n
"flow-rev-message-restore-topic-reason"~}}
- {{~else~}}
- {{~l10n "flow-rev-message-lock-topic-reason"~}}
- {{~/if~}}
- " />
- <div class="flow-form-actions flow-form-collapsible">
- <button data-role="submit"
- class="mw-ui-button mw-ui-constructive"
- >
- {{#if isLocked}}
- {{l10n
"flow-topic-action-unlock-topic"}}
- {{else}}
- {{l10n
"flow-topic-action-lock-topic"}}
- {{/if}}
- </button>
- {{> flow_form_cancel_button }}
- <small class="flow-terms-of-use plainlinks">
- {{#if isLocked}}
- {{l10nParse
"flow-terms-of-use-unlock-topic"}}
- {{else}}
- {{l10nParse
"flow-terms-of-use-lock-topic"}}
- {{/if}}
- </small>
- </div>
- </form>
+ {{~l10n
"flow-rev-message-lock-topic-reason"~}}
+ {{~/if~}}
+ " />
+ <div class="flow-form-actions
flow-form-collapsible">
+ <button data-role="submit"
+ class="mw-ui-button
mw-ui-constructive"
+ >
+ {{#if isLocked}}
+ {{l10n
"flow-topic-action-unlock-topic"}}
+ {{else}}
+ {{l10n
"flow-topic-action-lock-topic"}}
+ {{/if}}
+ </button>
+ {{> flow_form_cancel_button }}
+ <small class="flow-terms-of-use
plainlinks">
+ {{#if isLocked}}
+ {{l10nParse
"flow-terms-of-use-unlock-topic"}}
+ {{else}}
+ {{l10nParse
"flow-terms-of-use-lock-topic"}}
+ {{/if}}
+ </small>
+ </div>
+ </form>
+ </div>
</div>
</div>
--
To view, visit https://gerrit.wikimedia.org/r/258073
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iadf35173ce5c8794df67f0c354b9876db7166d5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits