mirror of
https://github.com/e107inc/e107.git
synced 2025-04-19 20:21:51 +02:00
Cleaned up Admin-UI in URL Aliases
This commit is contained in:
parent
e14971d81e
commit
d824f02838
@ -23,7 +23,7 @@ e107::coreLan('eurl', true);
|
||||
// TODO - admin interface support, remove it from globals
|
||||
$e_sub_cat = 'eurl';
|
||||
|
||||
|
||||
e107::css('inline', " span.e-help { cursor: help } ");
|
||||
|
||||
class eurl_admin extends e_admin_dispatcher
|
||||
{
|
||||
@ -832,7 +832,15 @@ class eurl_admin_form_ui extends e_admin_form_ui
|
||||
|
||||
$text = '';
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
||||
$text .= "<tr>
|
||||
<th>Module</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>";
|
||||
|
||||
$lng = e107::getLanguage();
|
||||
|
||||
foreach ($modules as $module => $obj)
|
||||
{
|
||||
$cfg = $obj->config->config();
|
||||
@ -840,21 +848,33 @@ class eurl_admin_form_ui extends e_admin_form_ui
|
||||
|
||||
if($module == 'index')
|
||||
{
|
||||
$text .= "
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>
|
||||
".LAN_EURL_CORE_INDEX."
|
||||
</td>
|
||||
<td>
|
||||
".LAN_EURL_CORE_INDEX_INFO."
|
||||
</td>
|
||||
<td>
|
||||
".LAN_EURL_FORM_HELP_EXAMPLE.":<br /><strong>".e107::getUrl()->create('/', '', array('full' => 1))."</strong>
|
||||
<table class='table table-striped table-bordered' style='margin-bottom:0'>
|
||||
<colgroup>
|
||||
<col style='width:20%' />
|
||||
<col style='width:40%' />
|
||||
<col style='width:40%' />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
".LAN_EURL_CORE_INDEX_INFO."
|
||||
</td>
|
||||
<td>
|
||||
".e107::getUrl()->create('/', '', array('full' => 1))."
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$help = array();
|
||||
$admin = $obj->config->admin();
|
||||
$lan = $lanDef[0];
|
||||
@ -873,37 +893,94 @@ class eurl_admin_form_ui extends e_admin_form_ui
|
||||
<td>
|
||||
";
|
||||
|
||||
|
||||
|
||||
|
||||
// default language
|
||||
$text .= $this->text('eurl_aliases['.$lanDef[0].']['.$module.']', $defVal).' ['.$lanDef[1].']'.$this->help(LAN_EURL_FORM_HELP_DEFAULT);
|
||||
$help[] = '['.$lanDef[1].'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
|
||||
// default language
|
||||
$text .= "<table class='table table-striped table-bordered' style='margin-bottom:0'>
|
||||
<colgroup>
|
||||
<col style='width:20%' />
|
||||
<col style='width:40%' />
|
||||
<col style='width:40%' />
|
||||
</colgroup>";
|
||||
|
||||
$text .= "<tr>
|
||||
<th>".ADLAN_132."</th>
|
||||
<th>".LAN_EURL_NAME_ALIASES."</th>
|
||||
<th>".LAN_EURL_FORM_HELP_EXAMPLE."</th>
|
||||
</tr>";
|
||||
|
||||
$text .= "<tr>";
|
||||
$text .= "<td>".$lanDef[1]."</td>";
|
||||
$text .= "<td class='form-inline'>";
|
||||
$text .= $this->text('eurl_aliases['.$lanDef[0].']['.$module.']', $defVal, 255, 'size=xlarge');
|
||||
// $text .= ' ['.$lanDef[1].']';
|
||||
$text .= "</td><td>";
|
||||
$text .= $this->help(LAN_EURL_FORM_HELP_DEFAULT);
|
||||
|
||||
$text .= "</td>";
|
||||
// $help[] = '['.$lanDef[1].'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
|
||||
$text .= "</tr>";
|
||||
|
||||
if(e107::getUrl()->router()->isMainModule($module))
|
||||
{
|
||||
$help = " <span class='e-tip e-help' title=\"".LAN_EURL_CORE_MAIN."\">".$tp->toGlyph('fa-home')."</span>";
|
||||
//$readonly = 1; // may be used later.
|
||||
$readonly = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$help = '';
|
||||
$readonly=0;
|
||||
}
|
||||
|
||||
if($lans)
|
||||
{
|
||||
|
||||
foreach ($lans as $code => $lan)
|
||||
{
|
||||
|
||||
$url = e107::getUrl()->create($module, '', array('lan' => $code, 'full' => 1, 'encode' => 0));
|
||||
$defVal = isset($currentAliases[$code]) && in_array($module, $currentAliases[$code]) ? array_search($module, $currentAliases[$code]) : $module;
|
||||
$text .= "<div class='spacer'><!-- --></div>";
|
||||
$text .= $this->text('eurl_aliases['.$code.']['.$module.']', $defVal).' ['.$lan.']'.$this->help(LAN_EURL_FORM_HELP_ALIAS_1.' <strong>'.$lan.'</strong>');
|
||||
$help[] = '['.$lan.'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
$defVal = isset($currentAliases[$code]) && in_array($module, $currentAliases[$code]) ? array_search($module, $currentAliases[$code]) : $module;
|
||||
|
||||
|
||||
// $help .= '['.$lan.'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
|
||||
$text .= "<tr>";
|
||||
$text .= "<td>".$lan."</td>";
|
||||
$text .= "<td class='form-inline'>". $this->text('eurl_aliases['.$code.']['.$module.']', $defVal, 255, array('size' => 'xlarge', 'readonly'=>$readonly));
|
||||
$text .= $help;
|
||||
$text .= "</td>";
|
||||
$text .= "<td>";
|
||||
|
||||
// $text .= $this->help(LAN_EURL_FORM_HELP_ALIAS_1.' <strong>'.$lan.'</strong>');
|
||||
// $text .= $this->help(LAN_EURL_FORM_HELP_ALIAS_1.' <strong>'.$lan.'</strong>');
|
||||
$url = $lng->subdomainUrl($lan,$url);
|
||||
$text .= $url;
|
||||
$text .= "</td>";
|
||||
// $text .= "<td>".
|
||||
|
||||
// $text .= '['.$lan.'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';
|
||||
// $text .= "</td>";
|
||||
$text .= "</tr>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$text .= "</table>
|
||||
</td></tr>";
|
||||
|
||||
|
||||
|
||||
if(e107::getUrl()->router()->isMainModule($module))
|
||||
{
|
||||
$help = array(LAN_EURL_CORE_MAIN);
|
||||
}
|
||||
|
||||
$text .= "
|
||||
/*$text .= "
|
||||
</td>
|
||||
<td>
|
||||
".implode("<div class='spacer'><!-- --></div>", $help)."
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
";*/
|
||||
|
||||
// $text .= "</tr>";
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
Loading…
x
Reference in New Issue
Block a user