Matthias Mullie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/221609

Change subject: Always show topic history
......................................................................

Always show topic history

I introduced this bug in I8b440d1c7f3e8f1324bdbdce34d64b191b0f93fa
Apparently, if there is no pagination, there won't be any navbar
(so not just in case of error)
The current if-block will cause all of history to be hidden if there
is no pagination.

Meanwhile also added the partial to render errors in board history.

Bug: T104192
Change-Id: I4c0bd46807d51c60ba2e45967e3cc5dd88ec9edd
---
M handlebars/compiled/flow_block_board-history.handlebars.php
M handlebars/compiled/flow_block_topic_history.handlebars.php
M handlebars/flow_block_board-history.handlebars
M handlebars/flow_block_topic_history.handlebars
4 files changed, 33 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/09/221609/1

diff --git a/handlebars/compiled/flow_block_board-history.handlebars.php 
b/handlebars/compiled/flow_block_board-history.handlebars.php
index 82e8e3a..5b17d8a 100644
--- a/handlebars/compiled/flow_block_board-history.handlebars.php
+++ b/handlebars/compiled/flow_block_board-history.handlebars.php
@@ -21,7 +21,14 @@
         'blockhelpers' => array(),
         'hbhelpers' => array(            'ifCond' => 
'Flow\TemplateHelper::ifCond',
 ),
-        'partials' => array('flow_moderation_actions_list' => function ($cx, 
$in, $sp) {return ''.$sp.'<section>'.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($in['moderationType']) && is_array($in)) ? 
$in['moderationType'] : null),'===','topic'),array()), $in, false, 
function($cx, $in)use($sp){return ''.((LCRun3::ifvar($cx, 
((isset($in['actions']['edit']) && is_array($in['actions'])) ? 
$in['actions']['edit'] : null))) ? '<li 
class="flow-js">'.htmlentities((string)((isset($in['noop']) && is_array($in)) ? 
$in['noop'] : null), ENT_QUOTES, 'UTF-8').'<a 
class="'.htmlentities((string)((isset($in['moderationMwUiClass']) && 
is_array($in)) ? $in['moderationMwUiClass'] : null), ENT_QUOTES, 'UTF-8').' 
mw-ui-progressive mw-ui-quiet mw-ui-hovericon"
+        'partials' => array('flow_errors' => function ($cx, $in, $sp) {return 
''.$sp.'<div class="flow-error-container">
+'.$sp.''.((LCRun3::ifvar($cx, ((isset($cx['sp_vars']['root']['errors']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['errors'] : null))) 
? '  <div class="flow-errors errorbox">
+'.$sp.'                <ul>
+'.$sp.''.LCRun3::sec($cx, ((isset($cx['sp_vars']['root']['errors']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['errors'] : null), 
$in, true, function($cx, $in)use($sp){return '                            
<li>'.LCRun3::ch($cx, 'html', array(array(((isset($in['message']) && 
is_array($in)) ? $in['message'] : null)),array()), 'encq').'</li>
+'.$sp.'';}).'          </ul>
+'.$sp.'        </div>
+'.$sp.'' : '').'</div>
+';},'flow_moderation_actions_list' => function ($cx, $in, $sp) {return 
''.$sp.'<section>'.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($in['moderationType']) && is_array($in)) ? 
$in['moderationType'] : null),'===','topic'),array()), $in, false, 
function($cx, $in)use($sp){return ''.((LCRun3::ifvar($cx, 
((isset($in['actions']['edit']) && is_array($in['actions'])) ? 
$in['actions']['edit'] : null))) ? '<li 
class="flow-js">'.htmlentities((string)((isset($in['noop']) && is_array($in)) ? 
$in['noop'] : null), ENT_QUOTES, 'UTF-8').'<a 
class="'.htmlentities((string)((isset($in['moderationMwUiClass']) && 
is_array($in)) ? $in['moderationMwUiClass'] : null), ENT_QUOTES, 'UTF-8').' 
mw-ui-progressive mw-ui-quiet mw-ui-hovericon"
 '.$sp.'                                   
href="'.htmlentities((string)((isset($in['actions']['edit']['url']) && 
is_array($in['actions']['edit'])) ? $in['actions']['edit']['url'] : null), 
ENT_QUOTES, 'UTF-8').'"
 '.$sp.'                                   
title="'.htmlentities((string)((isset($in['actions']['edit']['title']) && 
is_array($in['actions']['edit'])) ? $in['actions']['edit']['title'] : null), 
ENT_QUOTES, 'UTF-8').'"
 '.$sp.'                                   
data-flow-interactive-handler="apiRequest"
@@ -133,13 +140,14 @@
     );
     
     return '<div class="flow-board-history">
-       '.LCRun3::ch($cx, 'html', array(array(((isset($in['navbar']) && 
is_array($in)) ? $in['navbar'] : null)),array()), 'encq').'
+'.LCRun3::p($cx, 'flow_errors', array(array($in),array()), '   ').'
+       '.((LCRun3::ifvar($cx, ((isset($in['navbar']) && is_array($in)) ? 
$in['navbar'] : null))) ? ''.LCRun3::ch($cx, 'html', 
array(array(((isset($in['navbar']) && is_array($in)) ? $in['navbar'] : 
null)),array()), 'encq').'' : '').'
 
        <ul>
 '.LCRun3::sec($cx, ((isset($in['revisions']) && is_array($in)) ? 
$in['revisions'] : null), $in, true, function($cx, $in) {return '               
      <li>'.LCRun3::p($cx, 'flow_history_line', 
array(array($in),array())).'</li>
 ';}).' </ul>
 
-       '.LCRun3::ch($cx, 'html', array(array(((isset($in['navbar']) && 
is_array($in)) ? $in['navbar'] : null)),array()), 'encq').'
+       '.((LCRun3::ifvar($cx, ((isset($in['navbar']) && is_array($in)) ? 
$in['navbar'] : null))) ? ''.LCRun3::ch($cx, 'html', 
array(array(((isset($in['navbar']) && is_array($in)) ? $in['navbar'] : 
null)),array()), 'encq').'' : '').'
 </div>
 ';
 }
diff --git a/handlebars/compiled/flow_block_topic_history.handlebars.php 
b/handlebars/compiled/flow_block_topic_history.handlebars.php
index 96ec3eb..3594b23 100644
--- a/handlebars/compiled/flow_block_topic_history.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_history.handlebars.php
@@ -141,16 +141,16 @@
     
     return '<div class="flow-board">
 '.LCRun3::p($cx, 'flow_errors', array(array($in),array()), '   ').'
-'.((LCRun3::ifvar($cx, ((isset($in['navbar']) && is_array($in)) ? 
$in['navbar'] : null))) ? '          <div class="flow-topic-histories">
-                       '.LCRun3::ch($cx, 'html', 
array(array(((isset($in['navbar']) && is_array($in)) ? $in['navbar'] : 
null)),array()), 'encq').'
+       <div class="flow-topic-histories">
+               '.((LCRun3::ifvar($cx, ((isset($in['navbar']) && is_array($in)) 
? $in['navbar'] : null))) ? ''.LCRun3::ch($cx, 'html', 
array(array(((isset($in['navbar']) && is_array($in)) ? $in['navbar'] : 
null)),array()), 'encq').'' : '').'
 
-                       <ul>
-'.LCRun3::sec($cx, ((isset($in['revisions']) && is_array($in)) ? 
$in['revisions'] : null), $in, true, function($cx, $in) {return '               
                      <li>'.LCRun3::p($cx, 'flow_history_line', 
array(array($in),array())).'</li>
-';}).'                 </ul>
+               <ul>
+'.LCRun3::sec($cx, ((isset($in['revisions']) && is_array($in)) ? 
$in['revisions'] : null), $in, true, function($cx, $in) {return '               
              <li>'.LCRun3::p($cx, 'flow_history_line', 
array(array($in),array())).'</li>
+';}).'         </ul>
 
-                       '.LCRun3::ch($cx, 'html', 
array(array(((isset($in['navbar']) && is_array($in)) ? $in['navbar'] : 
null)),array()), 'encq').'
-               </div>
-' : '').'</div>
+               '.((LCRun3::ifvar($cx, ((isset($in['navbar']) && is_array($in)) 
? $in['navbar'] : null))) ? ''.LCRun3::ch($cx, 'html', 
array(array(((isset($in['navbar']) && is_array($in)) ? $in['navbar'] : 
null)),array()), 'encq').'' : '').'
+       </div>
+</div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/flow_block_board-history.handlebars 
b/handlebars/flow_block_board-history.handlebars
index 1ea48fd..eca174b 100644
--- a/handlebars/flow_block_board-history.handlebars
+++ b/handlebars/flow_block_board-history.handlebars
@@ -1,5 +1,7 @@
 <div class="flow-board-history">
-       {{html navbar}}
+       {{> flow_errors}}
+
+       {{#if navbar}}{{html navbar}}{{/if}}
 
        <ul>
                {{#each revisions}}
@@ -7,5 +9,5 @@
                {{/each}}
        </ul>
 
-       {{html navbar}}
+       {{#if navbar}}{{html navbar}}{{/if}}
 </div>
diff --git a/handlebars/flow_block_topic_history.handlebars 
b/handlebars/flow_block_topic_history.handlebars
index e12c137..e1bcf07 100644
--- a/handlebars/flow_block_topic_history.handlebars
+++ b/handlebars/flow_block_topic_history.handlebars
@@ -1,17 +1,15 @@
 <div class="flow-board">
        {{> flow_errors}}
 
-       {{#if navbar}}
-               <div class="flow-topic-histories">
-                       {{html navbar}}
+       <div class="flow-topic-histories">
+               {{#if navbar}}{{html navbar}}{{/if}}
 
-                       <ul>
-                               {{#each revisions}}
-                                       <li>{{> flow_history_line}}</li>
-                               {{/each}}
-                       </ul>
+               <ul>
+                       {{#each revisions}}
+                               <li>{{> flow_history_line}}</li>
+                       {{/each}}
+               </ul>
 
-                       {{html navbar}}
-               </div>
-       {{/if}}
+               {{#if navbar}}{{html navbar}}{{/if}}
+       </div>
 </div>

-- 
To view, visit https://gerrit.wikimedia.org/r/221609
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c0bd46807d51c60ba2e45967e3cc5dd88ec9edd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to