Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/98547
Change subject: Improve non-JS display of edit-(header|title|post)
......................................................................
Improve non-JS display of edit-(header|title|post)
They should now look more like their "default" JS counterparts
Change-Id: I3951e76b4f2dadb65a1ead4ed9ab249867e691f7
---
M modules/discussion/styles/post.less
M modules/discussion/styles/topic.less
M modules/header/styles/base.less
M templates/edit-header.html.php
M templates/edit-post.html.php
M templates/edit-title.html.php
6 files changed, 75 insertions(+), 28 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/47/98547/1
diff --git a/modules/discussion/styles/post.less
b/modules/discussion/styles/post.less
index ca908e5..d96ec3d 100644
--- a/modules/discussion/styles/post.less
+++ b/modules/discussion/styles/post.less
@@ -89,8 +89,6 @@
opacity: 1;
}
-
-
.flow-datestamp {
position: absolute;
right: 22px;
@@ -162,10 +160,12 @@
}
}
+ .flow-reply-form {
+ padding-top: 20px;
+ }
+
.flow-reply-form,
.flow-edit-post-form {
- padding-top: 20px;
-
.flow-post-form-controls {
margin-top: 5px;
text-align: right;
diff --git a/modules/discussion/styles/topic.less
b/modules/discussion/styles/topic.less
index 3fc0478..36595dc 100644
--- a/modules/discussion/styles/topic.less
+++ b/modules/discussion/styles/topic.less
@@ -170,16 +170,16 @@
.background-image-svg('../../base/images/watchlist_active.svg',
'../../base/images/watchlist_active.png');
}
}
+ }
- .flow-edit-title-form {
- .flow-edit-title-textbox {
- width: 100%;
- }
+ .flow-edit-title-form {
+ .flow-edit-title-textbox {
+ width: 100%;
+ }
- .flow-edit-title-controls {
- margin-top: 5px;
- text-align: right;
- }
+ .flow-edit-title-controls {
+ margin-top: 5px;
+ text-align: right;
}
}
}
diff --git a/modules/header/styles/base.less b/modules/header/styles/base.less
index bdde608..5deba71 100644
--- a/modules/header/styles/base.less
+++ b/modules/header/styles/base.less
@@ -40,6 +40,7 @@
}
.flow-edit-header-controls{
+ margin-top: 5px;
text-align: right;
}
}
diff --git a/templates/edit-header.html.php b/templates/edit-header.html.php
index 50d9275..a2431bf 100644
--- a/templates/edit-header.html.php
+++ b/templates/edit-header.html.php
@@ -2,7 +2,10 @@
// owning workflow
echo Html::openElement( 'div', array(
- 'id' => 'flow-header'
+ 'id' => 'flow-header',
+) );
+echo Html::openElement( 'div', array(
+ 'class' => 'flow-edit-header-form flow-element-container'
) );
echo Html::openElement( 'form', array(
'method' => 'POST',
@@ -46,3 +49,4 @@
echo Html::closeElement( 'div' );
echo Html::closeElement( 'form' );
echo Html::closeElement( 'div' );
+echo Html::closeElement( 'div' );
diff --git a/templates/edit-post.html.php b/templates/edit-post.html.php
index 7c144f8..e5b8416 100644
--- a/templates/edit-post.html.php
+++ b/templates/edit-post.html.php
@@ -1,5 +1,14 @@
<?php
+echo Html::openElement( 'div', array(
+ 'class' => 'flow-topic-container flow-topic-full'
+) );
+echo Html::openElement( 'div', array(
+ 'class' => 'flow-post-container'
+) );
+echo Html::openElement( 'div', array(
+ 'class' => 'flow-edit-post-form flow-element-container'
+) );
echo Html::openElement( 'form', array(
'method' => 'POST',
'action' => $this->generateUrl( $topic->getId(), 'edit-post' ),
@@ -22,10 +31,24 @@
'name' => $block->getName() . '[postId]',
'value' => $post->getPostId()->getHex(),
) ),
- Html::textarea( $block->getName() . '[content]', $this->getContent(
$post, 'wikitext', $user ) ),
- Html::element( 'input', array(
- 'type' => 'submit',
- 'class' => 'mw-ui-button mw-ui-primary',
- 'value' => wfMessage( 'flow-edit-post-submit' )->plain()
+ Html::textarea(
+ $block->getName() . '[content]',
+ $this->getContent( $post, 'wikitext', $user ),
+ array(
+ 'class' => 'mw-ui-input',
+ 'rows' => '10'
+ )
+ ),
+ Html::openElement( 'div', array(
+ 'class' => 'flow-post-form-controls',
) ),
- Html::closeElement( 'form' );
+ Html::element( 'input', array(
+ 'type' => 'submit',
+ 'class' => 'mw-ui-button mw-ui-constructive',
+ 'value' => wfMessage( 'flow-edit-post-submit' )->plain()
+ ) ),
+ Html::closeElement( 'div' ),
+Html::closeElement( 'form' ),
+Html::closeElement( 'div' ),
+Html::closeElement( 'div' ),
+Html::closeElement( 'div' );
diff --git a/templates/edit-title.html.php b/templates/edit-title.html.php
index 6b294e1..f8bb78a 100644
--- a/templates/edit-title.html.php
+++ b/templates/edit-title.html.php
@@ -1,5 +1,16 @@
<?php
+echo Html::openElement( 'div', array(
+ 'class' => 'flow-topic-container flow-topic-full'
+) );
+echo Html::openElement( 'div', array(
+ 'class' => 'flow-edit-title-form flow-element-container'
+) );
+echo Html::openElement( 'form', array(
+ 'method' => 'POST',
+ // root post shares its uuid with the workflow
+ 'action' => $this->generateUrl( $topicTitle->getPostId(), 'edit-title'
),
+) );
if ( $block->hasErrors() ) {
echo '<ul>';
foreach ( $block->getErrors() as $error ) {
@@ -8,19 +19,27 @@
echo '</ul>';
}
-echo Html::openElement( 'form', array(
- 'method' => 'POST',
- // root post shares its uuid with the workflow
- 'action' => $this->generateUrl( $topicTitle->getPostId(),
'edit-title' ),
+echo Html::element( 'input', array( 'type' => 'hidden', 'name' =>
'wpEditToken', 'value' => $editToken ) ),
+ Html::element(
+ 'input',
+ array(
+ 'name' => $block->getName() . '[content]',
+ 'class' => 'flow-edit-title-textbox mw-ui-input',
+ 'value' => $this->getContent( $topicTitle, 'wikitext',
$user ),
+ ),
+ $this->getContent( $topicTitle, 'wikitext', $user )
+ ),
+ Html::openElement( 'div', array(
+ 'class' => 'flow-edit-title-controls',
) ),
- Html::element( 'input', array( 'type' => 'hidden', 'name' =>
'wpEditToken', 'value' => $editToken ) ),
- Html::textarea( $block->getName() . '[content]',
$this->getContent( $topicTitle, 'wikitext', $user ) ),
Html::element( 'input',
array(
'type' => 'submit',
'value' => wfMessage( 'flow-edit-title-submit'
)->plain(),
- 'class' => 'mw-ui-button mw-ui-primary',
+ 'class' => 'mw-ui-button mw-ui-constructive',
)
),
- Html::closeElement( 'form' );
-
+ Html::closeElement( 'div' ),
+Html::closeElement( 'form' ),
+Html::closeElement( 'div' ),
+Html::closeElement( 'div' );
--
To view, visit https://gerrit.wikimedia.org/r/98547
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3951e76b4f2dadb65a1ead4ed9ab249867e691f7
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