Ragesoss has uploaded a new change for review.
https://gerrit.wikimedia.org/r/78407
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.
Change-Id: Ia4fe883842bdc998ad997fe0b148f1f8b0ff6ef5
---
M EducationProgram.i18n.php
M includes/Utils.php
2 files changed, 7 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram
refs/changes/07/78407/1
diff --git a/EducationProgram.i18n.php b/EducationProgram.i18n.php
index 268d090..0ce110a 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}}',
diff --git a/includes/Utils.php b/includes/Utils.php
index 467b966..e02aad3 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>';
}
--
To view, visit https://gerrit.wikimedia.org/r/78407
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4fe883842bdc998ad997fe0b148f1f8b0ff6ef5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Ragesoss <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits