Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/89209
Change subject: Move topic history link to behind timestamp
......................................................................
Move topic history link to behind timestamp
Change-Id: I9b9ecc9c51607895ee38a3e395092fd4f4cd39ee
---
M modules/discussion/styles/topic.less
M modules/discussion/ui.js
M templates/topic.html.php
3 files changed, 20 insertions(+), 22 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/09/89209/1
diff --git a/modules/discussion/styles/topic.less
b/modules/discussion/styles/topic.less
index cf5b924..5e19ed4 100644
--- a/modules/discussion/styles/topic.less
+++ b/modules/discussion/styles/topic.less
@@ -89,6 +89,10 @@
position: absolute;
right: 22px;
bottom: 22px;
+
+ a.flow-action-history-link {
+ color: inherit;
+ }
}
.flow-icon {
diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js
index e863619..c9945d7 100644
--- a/modules/discussion/ui.js
+++ b/modules/discussion/ui.js
@@ -156,6 +156,7 @@
'.flow-actions',
'.flow-icon-permalink',
'.flow-icon-watchlist',
+ '.flow-action-history-link'
];
if ( $( e.target ).closest( ignore.join( ',' )
).length > 0 ) {
return true;
diff --git a/templates/topic.html.php b/templates/topic.html.php
index 0349b00..bd790d6 100644
--- a/templates/topic.html.php
+++ b/templates/topic.html.php
@@ -38,17 +38,6 @@
<li class="flow-action-close">
<a href="#" class="mw-ui-button">@todo:
Close topic</a>
</li>
- <li class="flow-action-topic-history">
- <?php
- echo Html::rawElement( 'a',
- array(
- 'class' =>
'mw-ui-button',
- 'href' =>
$this->generateUrl( $root->getPostId(), 'topic-history' ),
- ),
- wfMessage(
'flow-topic-action-history' )
- );
- ?>
- </li>
</ul>
</div>
</div>
@@ -88,17 +77,21 @@
?>
<p class="flow-datestamp">
- <span class="flow-agotime" style="display: inline">
- <?php echo wfMessage( 'flow-last-modified' )->rawParams(
-
$topic->getLastModifiedObj()->getHumanTimestamp()
- ); ?>
- </span>
- <span class="flow-utctime" style="display: none">
- <?php
- $ts = new MWTimestamp( $topic->getLastModified() );
- echo $ts->getTimestamp( TS_RFC2822 );
- ?>
- </span>
+ <?php
+ // timestamp html
+ $content = '
+ <span class="flow-agotime" style="display:
inline">'. $topic->getLastModifiedObj()->getHumanTimestamp() .'</span>
+ <span class="flow-utctime" style="display:
none">'. $topic->getLastModifiedObj()->getTimestamp( TS_RFC2822 ) .'</span>';
+
+ // build history button with timestamp html as content
+ echo Html::rawElement( 'a',
+ array(
+ 'class' => 'flow-action-history-link',
+ 'href' => $this->generateUrl(
$root->getPostId(), 'topic-history' ),
+ ),
+ $content
+ );
+ ?>
</p>
</div>
--
To view, visit https://gerrit.wikimedia.org/r/89209
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b9ecc9c51607895ee38a3e395092fd4f4cd39ee
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