jenkins-bot has submitted this change and it was merged.
Change subject: Add a link to show user subpages for each student in the
articles table.
......................................................................
Add a link to show user subpages for each student in the articles
table.
Add an additional link, intended to make it easy to find student
sandboxes, to the set of links that appears after each username
in the table of students and articles on each course page, by
changing the getToolLinks functions. Also change labels for
courses that have ended from Passed to Previous to be less
confusable with the concept of students having "passed" a course.
Change-Id: Ia4fe883842bdc998ad997fe0b148f1f8b0ff6ef5
---
M EducationProgram.i18n.php
M includes/Utils.php
M includes/pagers/ArticleTable.php
3 files changed, 9 insertions(+), 1 deletion(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/EducationProgram.i18n.php b/EducationProgram.i18n.php
index 268d090..8c0e0a3 100644
--- a/EducationProgram.i18n.php
+++ b/EducationProgram.i18n.php
@@ -328,6 +328,7 @@
'epstudentpager-header-student' => 'Student',
'epstudentpager-header-articles' => 'Articles',
'epstudentpager-header-reviewers' => 'Reviewers',
+ 'ep-articles-sandboxes' => 'sandboxes',
'ep-articles-remstudent' => 'remove from course',
'ep-articles-remreviewer-self' => 'Remove you as
{{GENDER:$1|reviewer}}',
'ep-articles-remreviewer' => 'remove as {{GENDER:$1|reviewer}}',
@@ -1218,6 +1219,7 @@
'epstudentpager-header-articles' => 'Table column header',
'epstudentpager-header-reviewers' => 'Table column header.
{{Identical|Reviewer}}',
+ 'ep-articles-sandboxes' => 'Link text shown in user tool links
section, for list of user subpages',
'ep-articles-remstudent' => 'Link text shown in user tool links
section',
'ep-articles-remreviewer-self' => 'Link text, displayed next to a
reviewer that is the current user. Parameters:
* $1 is the user name',
diff --git a/includes/Utils.php b/includes/Utils.php
index 467b966..9127769 100644
--- a/includes/Utils.php
+++ b/includes/Utils.php
@@ -163,6 +163,12 @@
$context->msg( 'contribslink' )->escaped()
);
+ // Add a link showing all the user subpages for the user.
+ $links[] = Linker::link(
+ \SpecialPage::getTitleFor( 'PrefixIndex', 'User:' .
$userName, '' ),
+ $context->msg( 'ep-articles-sandboxes' )->escaped()
+ );
+
// @todo FIXME: Hard coded parentheses.
return ' <span class="mw-usertoollinks">(' .
$context->getLanguage()->pipeList( array_merge( $links, $extraLinks ) ) .
')</span>';
}
diff --git a/includes/pagers/ArticleTable.php b/includes/pagers/ArticleTable.php
index 3a59f59..eac1cf0 100644
--- a/includes/pagers/ArticleTable.php
+++ b/includes/pagers/ArticleTable.php
@@ -280,7 +280,7 @@
);
}
else {
- $html .= Linker::userToolLinks( $userId,
$user->getName() );
+ $html .= Utils::getToolLinks( $userId,
$user->getName(), $this->getContext() );
}
return html::rawElement(
--
To view, visit https://gerrit.wikimedia.org/r/78407
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4fe883842bdc998ad997fe0b148f1f8b0ff6ef5
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Ragesoss <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ragesoss <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits