mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 08:10:45 +00:00
Removed unused functions
This commit is contained in:
parent
a6bcf28acd
commit
86882116df
|
@ -4,7 +4,6 @@ use MediaWiki\MediaWikiServices;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BaseTemplate class for the Citizen skin
|
* BaseTemplate class for the Citizen skin
|
||||||
* TODO: Add missing title to buttons
|
|
||||||
* @ingroup Skins
|
* @ingroup Skins
|
||||||
*/
|
*/
|
||||||
class CitizenTemplate extends BaseTemplate {
|
class CitizenTemplate extends BaseTemplate {
|
||||||
|
@ -123,6 +122,7 @@ class CitizenTemplate extends BaseTemplate {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the navigation menu
|
* Render the navigation menu
|
||||||
|
* TODO: Convert the rest to Mustache
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function buildMenu() : array {
|
private function buildMenu() : array {
|
||||||
|
@ -210,40 +210,6 @@ class CitizenTemplate extends BaseTemplate {
|
||||||
return $props;
|
return $props;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates the sitetitle
|
|
||||||
* @param string $option
|
|
||||||
* @return string html
|
|
||||||
*/
|
|
||||||
protected function getSiteTitle( $option ) {
|
|
||||||
$html = '';
|
|
||||||
$language = $this->getSkin()->getLanguage();
|
|
||||||
$siteTitle = $language->convert( $this->getMsg( 'sitetitle' )->escaped() );
|
|
||||||
|
|
||||||
if ( $option === 'link' ) {
|
|
||||||
$html .= Html::rawElement(
|
|
||||||
'a',
|
|
||||||
[
|
|
||||||
'id' => 'p-banner',
|
|
||||||
'class' => 'mw-wiki-title',
|
|
||||||
'href' => $this->data['nav_urls']['mainpage']['href'],
|
|
||||||
] + Linker::tooltipAndAccesskeyAttribs( 'p-logo' ),
|
|
||||||
$siteTitle
|
|
||||||
);
|
|
||||||
} elseif ( $option === 'text' ) {
|
|
||||||
$html .= Html::rawElement(
|
|
||||||
'span',
|
|
||||||
[
|
|
||||||
'id' => 'p-banner',
|
|
||||||
'class' => 'mw-wiki-title',
|
|
||||||
],
|
|
||||||
$siteTitle
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates the sidebar
|
* Generates the sidebar
|
||||||
* Set the elements to true to allow them to be part of the sidebar
|
* Set the elements to true to allow them to be part of the sidebar
|
||||||
|
@ -259,7 +225,6 @@ class CitizenTemplate extends BaseTemplate {
|
||||||
|
|
||||||
$sidebar = $this->getSidebar();
|
$sidebar = $this->getSidebar();
|
||||||
$sidebar['TOOLBOX'] = true;
|
$sidebar['TOOLBOX'] = true;
|
||||||
$sidebar['LANGUAGES'] = false;
|
|
||||||
|
|
||||||
foreach ( $sidebar as $name => $content ) {
|
foreach ( $sidebar as $name => $content ) {
|
||||||
if ( $content === false ) {
|
if ( $content === false ) {
|
||||||
|
@ -272,9 +237,6 @@ class CitizenTemplate extends BaseTemplate {
|
||||||
case 'TOOLBOX':
|
case 'TOOLBOX':
|
||||||
$html .= $this->getPortlet( 'tb', $this->getToolbox(), 'toolbox' );
|
$html .= $this->getPortlet( 'tb', $this->getToolbox(), 'toolbox' );
|
||||||
break;
|
break;
|
||||||
case 'LANGUAGES':
|
|
||||||
$html .= $this->getLanguageLinks();
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
$html .= $this->getPortlet( $name, $content['content'] );
|
$html .= $this->getPortlet( $name, $content['content'] );
|
||||||
break;
|
break;
|
||||||
|
@ -344,20 +306,6 @@ class CitizenTemplate extends BaseTemplate {
|
||||||
return $html . Html::closeElement( 'div' );
|
return $html . Html::closeElement( 'div' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* In other languages list
|
|
||||||
*
|
|
||||||
* @return string html
|
|
||||||
*/
|
|
||||||
protected function getLanguageLinks() {
|
|
||||||
$html = '';
|
|
||||||
if ( $this->data['language_urls'] !== false ) {
|
|
||||||
$html .= $this->getPortlet( 'lang', $this->data['language_urls'], 'otherlanguages' );
|
|
||||||
}
|
|
||||||
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Language variants. Displays list for converting between different scripts in the same language,
|
* Language variants. Displays list for converting between different scripts in the same language,
|
||||||
* if using a language where this is applicable (such as latin vs cyric display for serbian).
|
* if using a language where this is applicable (such as latin vs cyric display for serbian).
|
||||||
|
|
Loading…
Reference in a new issue