[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove Settings box when Quiz is set to simple

2017-07-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363635 )

Change subject: Remove Settings box when Quiz is set to simple
..


Remove Settings box when Quiz is set to simple

Due to the change for T161317, the settings table was being displayed even when
the display is set to simple.This change modifies the mustache templates to
remove the settings box.

Bug:T169529
Change-Id: I2a51df9bfb0fac7a6b1bc8e988836a2d81f6f095
---
M Quiz.class.php
M templates/Quiz.mustache
M templates/Setting.mustache
3 files changed, 44 insertions(+), 37 deletions(-)

Approvals:
  jenkins-bot: Verified
  Mvolz: Looks good to me, approved



diff --git a/Quiz.class.php b/Quiz.class.php
index b5c3330..7ef1d2c 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -131,6 +131,8 @@
$settingsTable = $templateParser->processTemplate(
'Setting',
[
+   'isSettingFirstRow' => ( !$this->mDisplaySimple 
|| $this->mBeingCorrected || $this->mState === 'error' ),
+   'isSettingOtherRow' => ( !$this->mDisplaySimple 
|| $this->mBeingCorrected ),
'notSimple' => !$this->mDisplaySimple,
'corrected' => $this->mBeingCorrected,
'shuffle' => $this->mShuffle,
diff --git a/templates/Quiz.mustache b/templates/Quiz.mustache
index aaa30e8..155cbec 100644
--- a/templates/Quiz.mustache
+++ b/templates/Quiz.mustache
@@ -1,9 +1,9 @@
 


-   
-   {{{ settingsTable }}}
-   
+   {{#settingsTable }}
+   {{{ . }}}
+   {{/settingsTable }}



diff --git a/templates/Setting.mustache b/templates/Setting.mustache
index 547b580..15f30a4 100644
--- a/templates/Setting.mustache
+++ b/templates/Setting.mustache
@@ -1,41 +1,47 @@
-
-   {{# notSimple}}
-   {{ wfMessage.quiz_added }}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ 
wf.Message.quiz_colorRight }}
-   {{/corrected}}
-   {{# error}}
-   {{^ corrected}}
-   
-   {{ wfMessage.quiz_colorError }}
+{{# isSettingFirstRow}}
+   
+   {{# notSimple}}
+   {{ wfMessage.quiz_added }}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wf.Message.quiz_colorRight }}
{{/corrected}}
-   {{/ error}}
+   {{# error}}
+   {{^ corrected}}
+   
+   {{ wfMessage.quiz_colorError }}
+   {{/corrected}}
+   {{/ error}}

+{{/ isSettingFirstRow}}
+{{# isSettingOtherRow}}

-   {{# notSimple}}
-   {{ wfMessage.quiz_cutoff }}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ 
wfMessage.quiz_colorWrong }}
-   {{/ corrected}}
+   {{# notSimple}}
+   {{ wfMessage.quiz_cutoff }}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wfMessage.quiz_colorWrong }}
+   {{/ corrected}}

+{{/ isSettingOtherRow}}
+{{# isSettingOtherRow}}

-   {{# notSimple}}
-   {{{ wfMessage.quiz_ignoreCoef }}}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ wfMessage.quiz_colorNA 
}}
-   {{/ corrected}}
+   {{# notSimple}}
+   {{{ wfMessage.quiz_ignoreCoef }}}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wfMessage.quiz_colorNA }}
+   {{/ corrected}}

+{{/ isSettingOtherRow}}
+{{# notSimple}}

-   {{# notSimple}}
{{# shuffle}}
{{^ corrected}}
{{# shuffleDisplay}}
@@ -55,6 +61,5 @@
{{ wfMessage.quiz_colorError }}
{{/ corrected}}
{{/ error}}
-   {{/ notSimple}}
-
-
+   
+{{/ notSimple}}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a51df9bfb0fac7a6b1bc8e988836a2d81f6f095
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 
Gerrit-Reviewer: Mvolz 

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove Settings box when Quiz is set to simple

2017-07-06 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363635 )

Change subject: Remove Settings box when Quiz is set to simple
..

Remove Settings box when Quiz is set to simple

Due to the change for T161317, the settings table was being displayed even when
the display is set to simple.This change modifies the mustache templates to
remove the settings box.

Bug:T169529
Change-Id: I2a51df9bfb0fac7a6b1bc8e988836a2d81f6f095
---
M Quiz.class.php
M templates/Quiz.mustache
M templates/Setting.mustache
3 files changed, 44 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz 
refs/changes/35/363635/1

diff --git a/Quiz.class.php b/Quiz.class.php
index b5c3330..7ef1d2c 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -131,6 +131,8 @@
$settingsTable = $templateParser->processTemplate(
'Setting',
[
+   'isSettingFirstRow' => ( !$this->mDisplaySimple 
|| $this->mBeingCorrected || $this->mState === 'error' ),
+   'isSettingOtherRow' => ( !$this->mDisplaySimple 
|| $this->mBeingCorrected ),
'notSimple' => !$this->mDisplaySimple,
'corrected' => $this->mBeingCorrected,
'shuffle' => $this->mShuffle,
diff --git a/templates/Quiz.mustache b/templates/Quiz.mustache
index aaa30e8..155cbec 100644
--- a/templates/Quiz.mustache
+++ b/templates/Quiz.mustache
@@ -1,9 +1,9 @@
 


-   
-   {{{ settingsTable }}}
-   
+   {{#settingsTable }}
+   {{{ . }}}
+   {{/settingsTable }}



diff --git a/templates/Setting.mustache b/templates/Setting.mustache
index 547b580..15f30a4 100644
--- a/templates/Setting.mustache
+++ b/templates/Setting.mustache
@@ -1,41 +1,47 @@
-
-   {{# notSimple}}
-   {{ wfMessage.quiz_added }}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ 
wf.Message.quiz_colorRight }}
-   {{/corrected}}
-   {{# error}}
-   {{^ corrected}}
-   
-   {{ wfMessage.quiz_colorError }}
+{{# isSettingFirstRow}}
+   
+   {{# notSimple}}
+   {{ wfMessage.quiz_added }}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wf.Message.quiz_colorRight }}
{{/corrected}}
-   {{/ error}}
+   {{# error}}
+   {{^ corrected}}
+   
+   {{ wfMessage.quiz_colorError }}
+   {{/corrected}}
+   {{/ error}}

+{{/ isSettingFirstRow}}
+{{# isSettingOtherRow}}

-   {{# notSimple}}
-   {{ wfMessage.quiz_cutoff }}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ 
wfMessage.quiz_colorWrong }}
-   {{/ corrected}}
+   {{# notSimple}}
+   {{ wfMessage.quiz_cutoff }}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wfMessage.quiz_colorWrong }}
+   {{/ corrected}}

+{{/ isSettingOtherRow}}
+{{# isSettingOtherRow}}

-   {{# notSimple}}
-   {{{ wfMessage.quiz_ignoreCoef }}}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ wfMessage.quiz_colorNA 
}}
-   {{/ corrected}}
+   {{# notSimple}}
+   {{{ wfMessage.quiz_ignoreCoef }}}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wfMessage.quiz_colorNA }}
+   {{/ corrected}}

+{{/ isSettingOtherRow}}
+{{# notSimple}}

-   {{# notSimple}}
{{# shuffle}}
{{^ corrected}}
{{# shuffleDisplay}}
@@ -55,6 +61,5 @@
{{ wfMessage.quiz_colorError }}
{{/ corrected}}
{{/ error}}
-   {{/ notSimple}}
-
-
+   
+{{/ notSimple}}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a51df9bfb0fac7a6b1bc8e988836a2d81f6f095
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove Settings box when Quiz is set to simple

2017-07-06 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363634 )

Change subject: Remove Settings box when Quiz is set to simple
..

Remove Settings box when Quiz is set to simple

Due to the change for T161317, the settings table was being displayed even when
the display is set to simple.This change modifies the mustache templates to
remove the settings box.

Bug:T169529
Change-Id: I0257af97ab2f3612d51c8b88dd29769a2db49e94
---
M Quiz.class.php
M templates/Quiz.mustache
M templates/Setting.mustache
3 files changed, 44 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz 
refs/changes/34/363634/1

diff --git a/Quiz.class.php b/Quiz.class.php
index b5c3330..7ef1d2c 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -131,6 +131,8 @@
$settingsTable = $templateParser->processTemplate(
'Setting',
[
+   'isSettingFirstRow' => ( !$this->mDisplaySimple 
|| $this->mBeingCorrected || $this->mState === 'error' ),
+   'isSettingOtherRow' => ( !$this->mDisplaySimple 
|| $this->mBeingCorrected ),
'notSimple' => !$this->mDisplaySimple,
'corrected' => $this->mBeingCorrected,
'shuffle' => $this->mShuffle,
diff --git a/templates/Quiz.mustache b/templates/Quiz.mustache
index aaa30e8..155cbec 100644
--- a/templates/Quiz.mustache
+++ b/templates/Quiz.mustache
@@ -1,9 +1,9 @@
 


-   
-   {{{ settingsTable }}}
-   
+   {{#settingsTable }}
+   {{{ . }}}
+   {{/settingsTable }}



diff --git a/templates/Setting.mustache b/templates/Setting.mustache
index 547b580..15f30a4 100644
--- a/templates/Setting.mustache
+++ b/templates/Setting.mustache
@@ -1,41 +1,47 @@
-
-   {{# notSimple}}
-   {{ wfMessage.quiz_added }}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ 
wf.Message.quiz_colorRight }}
-   {{/corrected}}
-   {{# error}}
-   {{^ corrected}}
-   
-   {{ wfMessage.quiz_colorError }}
+{{# isSettingFirstRow}}
+   
+   {{# notSimple}}
+   {{ wfMessage.quiz_added }}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wf.Message.quiz_colorRight }}
{{/corrected}}
-   {{/ error}}
+   {{# error}}
+   {{^ corrected}}
+   
+   {{ wfMessage.quiz_colorError }}
+   {{/corrected}}
+   {{/ error}}

+{{/ isSettingFirstRow}}
+{{# isSettingOtherRow}}

-   {{# notSimple}}
-   {{ wfMessage.quiz_cutoff }}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ 
wfMessage.quiz_colorWrong }}
-   {{/ corrected}}
+   {{# notSimple}}
+   {{ wfMessage.quiz_cutoff }}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wfMessage.quiz_colorWrong }}
+   {{/ corrected}}

+{{/ isSettingOtherRow}}
+{{# isSettingOtherRow}}

-   {{# notSimple}}
-   {{{ wfMessage.quiz_ignoreCoef }}}
-   
-   {{/ notSimple}}
-   {{# corrected}}
-   
-   {{ wfMessage.quiz_colorNA 
}}
-   {{/ corrected}}
+   {{# notSimple}}
+   {{{ wfMessage.quiz_ignoreCoef }}}
+   
+   {{/ notSimple}}
+   {{# corrected}}
+   
+   {{ 
wfMessage.quiz_colorNA }}
+   {{/ corrected}}

+{{/ isSettingOtherRow}}
+{{# notSimple}}

-   {{# notSimple}}
{{# shuffle}}
{{^ corrected}}
{{# shuffleDisplay}}
@@ -55,6 +61,5 @@
{{ wfMessage.quiz_colorError }}
{{/ corrected}}
{{/ error}}
-   {{/ notSimple}}
-
-
+   
+{{/ notSimple}}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0257af97ab2f3612d51c8b88dd29769a2db49e94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh