Skip to content
Snippets Groups Projects
Commit f7248191 authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Use horizontal flag tabs on category-, form edit

parent 718a42fd
No related branches found
No related tags found
No related merge requests found
...@@ -69,12 +69,10 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ...@@ -69,12 +69,10 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
<div class="tab_content" id="info"> <div class="tab_content" id="info">
<table width="100%"><tr>
<?php <?php
$langs = Internationalization::getConfiguredSystemLanguages(); $langs = Internationalization::getConfiguredSystemLanguages();
if (count($langs) > 1) { ?> if (count($langs) > 1) { ?>
<td valign="top"> <ul class="alt tabs clean" id="trans">
<ul class="vertical tabs left" id="trans" style="margin-top:10px;">
<li class="empty"><i class="icon-globe" title="This content is translatable"></i></li> <li class="empty"><i class="icon-globe" title="This content is translatable"></i></li>
<?php foreach ($langs as $tag=>$i) { <?php foreach ($langs as $tag=>$i) {
list($lang, $locale) = explode('_', $tag); list($lang, $locale) = explode('_', $tag);
...@@ -86,12 +84,10 @@ if (count($langs) > 1) { ?> ...@@ -86,12 +84,10 @@ if (count($langs) > 1) { ?>
</a></li> </a></li>
<?php } ?> <?php } ?>
</ul> </ul>
</td>
<?php <?php
} ?> } ?>
<td id="trans_container">
<?php foreach ($langs as $tag=>$i) { <?php foreach ($langs as $tag=>$i) {
$code = $i['code']; $code = $i['code'];
$cname = 'name'; $cname = 'name';
...@@ -106,7 +102,7 @@ if (count($langs) > 1) { ?> ...@@ -106,7 +102,7 @@ if (count($langs) > 1) { ?>
$cname = "trans[$code][$cname]"; $cname = "trans[$code][$cname]";
$dname = "trans[$code][$dname]"; $dname = "trans[$code][$dname]";
} ?> } ?>
<div class="tab_content left <?php <div class="tab_content <?php
if ($code != $cfg->getPrimaryLanguage()) echo "hidden"; if ($code != $cfg->getPrimaryLanguage()) echo "hidden";
?>" id="lang-<?php echo $tag; ?>" ?>" id="lang-<?php echo $tag; ?>"
<?php if ($i['direction'] == 'rtl') echo 'dir="rtl" class="rtl"'; ?> <?php if ($i['direction'] == 'rtl') echo 'dir="rtl" class="rtl"'; ?>
...@@ -131,7 +127,6 @@ if (count($langs) > 1) { ?> ...@@ -131,7 +127,6 @@ if (count($langs) > 1) { ?>
echo $desc; ?></textarea> echo $desc; ?></textarea>
</div> </div>
<?php } ?> <?php } ?>
</td></tr></table>
</div> </div>
......
...@@ -53,13 +53,12 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ...@@ -53,13 +53,12 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
</tr> </tr>
</thead> </thead>
<tbody style="vertical-align:top"> <tbody style="vertical-align:top">
<tr> <tr>
<td colspan="2"> <td colspan="2">
<table class="full-width"><tbody><tr><td style="vertical-align:top">
<?php <?php
$langs = Internationalization::getConfiguredSystemLanguages(); $langs = Internationalization::getConfiguredSystemLanguages();
if ($form && count($langs) > 1) { ?> if ($form && count($langs) > 1) { ?>
<ul class="vertical tabs" id="translations"> <ul class="alt tabs clean" id="translations">
<li class="empty"><i class="icon-globe" title="This content is translatable"></i></li> <li class="empty"><i class="icon-globe" title="This content is translatable"></i></li>
<?php foreach ($langs as $tag=>$nfo) { ?> <?php foreach ($langs as $tag=>$nfo) { ?>
<li class="<?php if ($tag == $cfg->getPrimaryLanguage()) echo "active"; <li class="<?php if ($tag == $cfg->getPrimaryLanguage()) echo "active";
...@@ -71,8 +70,7 @@ if ($form && count($langs) > 1) { ?> ...@@ -71,8 +70,7 @@ if ($form && count($langs) > 1) { ?>
</ul> </ul>
<?php <?php
} ?> } ?>
</td> <div id="translations_container">
<td id="translations_container">
<div id="translation-<?php echo $cfg->getPrimaryLanguage(); ?>" class="tab_content" <div id="translation-<?php echo $cfg->getPrimaryLanguage(); ?>" class="tab_content"
lang="<?php echo $cfg->getPrimaryLanguage(); ?>"> lang="<?php echo $cfg->getPrimaryLanguage(); ?>">
<div class="required"><?php echo __('Title'); ?>:</div> <div class="required"><?php echo __('Title'); ?>:</div>
...@@ -106,13 +104,13 @@ if ($form && count($langs) > 1) { ?> ...@@ -106,13 +104,13 @@ if ($form && count($langs) > 1) { ?>
<i class="help-tip icon-question-sign" href="#form_instructions"></i> <i class="help-tip icon-question-sign" href="#form_instructions"></i>
</div> </div>
<textarea name="trans[<?php echo $tag; ?>][instructions]" cols="21" rows="12" <textarea name="trans[<?php echo $tag; ?>][instructions]" cols="21" rows="12"
style="width:100%" class="richtext"><?php style="width:100%" class="richtext small"><?php
echo $info['trans'][$tag]['instructions']; ?></textarea> echo $info['trans'][$tag]['instructions']; ?></textarea>
</div> </div>
<?php } <?php }
} ?> } ?>
</td></tr></tbody></table> </td>
</td></tr> </tr>
</tbody> </tbody>
</table> </table>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2"> <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment