Merge "Add link on Special:Upload to edit MediaWiki:Licenses"

This commit is contained in:
jenkins-bot 2014-07-15 15:30:55 +00:00 committed by Gerrit Code Review
commit 97dc02ccdb
4 changed files with 20 additions and 2 deletions

View file

@ -788,6 +788,18 @@ class UploadForm extends HTMLForm {
wfRunHooks( 'UploadFormInitDescriptor', array( &$descriptor ) );
parent::__construct( $descriptor, $context, 'upload' );
# Add a link to edit MediaWik:Licenses
if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
$licensesLink = Linker::link(
Title::makeTitle( NS_MEDIAWIKI, 'Licenses' ),
$this->msg( 'licenses-edit' )->escaped(),
array(),
array( 'action' => 'edit' )
);
$editLicenses = '<p class="mw-upload-editlicenses">' . $licensesLink . '</p>';
$this->addFooterText( $editLicenses, 'description' );
}
# Set some form properties
$this->setSubmitText( $this->msg( 'uploadbtn' )->text() );
$this->setSubmitName( 'wpUpload' );

View file

@ -1413,6 +1413,7 @@
"license-header": "Licensing",
"nolicense": "None selected",
"licenses": "-",
"licenses-edit": "Edit license options",
"license-nopreview": "(Preview not available)",
"upload_source_url": "(a valid, publicly accessible URL)",
"upload_source_file": "(a file on your computer)",

View file

@ -1575,6 +1575,7 @@
"license-header": "Used as section header in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Filedesc}}\n* {{msg-mw|Filestatus}}\n* {{msg-mw|Filesource}}\n{{Identical|Licensing}}",
"nolicense": "{{Identical|None selected}}",
"licenses": "{{notranslate}}",
"licenses-edit": "Label text for a link on Special:Upload to edit MediaWiki:Licenses",
"license-nopreview": "Error message when a certain license does not exist",
"upload_source_url": "Used in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Sourcefilename|label}}\n* {{msg-mw|Sourceurl|label}}\n* {{msg-mw|Upload source file}}\n* {{msg-mw|Upload-maxfilesize}}",
"upload_source_file": "Used in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Sourcefilename|label}}\n* {{msg-mw|Sourceurl|label}}\n* {{msg-mw|Upload source url}}\n* {{msg-mw|Upload-maxfilesize}}",

View file

@ -372,12 +372,16 @@ input#wpSummary {
display: none;
}
/* Convenience links to edit block, delete and protect reasons */
/**
* Convenience links to edit block, delete and protect reasons
* and upload licenses
*/
p.mw-ipb-conveniencelinks,
p.mw-protect-editreasons,
p.mw-filedelete-editreasons,
p.mw-delete-editreasons,
p.mw-revdel-editreasons {
p.mw-revdel-editreasons,
p.mw-upload-editlicenses {
font-size: 90%;
text-align: right;
}