Languages support

This commit is contained in:
dignajar 2015-07-03 21:14:58 -03:00
parent 8037eada9b
commit 9f81946701
9 changed files with 30 additions and 12 deletions

View File

@ -20,7 +20,7 @@ function editPost($args)
if( $dbPosts->edit($args) )
{
Alert::set('The post has been saved successfull');
Redirect::page('admin', 'manage-posts');
Redirect::page('admin', 'edit-post/'.$args['key']);
}
else
{

View File

@ -1,6 +1,6 @@
<h2 class="title"><i class="fa fa-pencil"></i> <?php $Language->p('Edit page') ?></h2>
<form method="post" action="" class="forms">
<form id="jsform" method="post" action="" class="forms">
<input type="hidden" id="jskey" name="key" value="<?php echo $_Page->key() ?>">
@ -20,7 +20,7 @@
}
else
{
echo '<p class="advOptions">'.$Language->p('Enable more features at').'<a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->p('settings-advanced-writting-settings').'</a></p>';
echo '<p class="advOptions">'.$Language->g('Enable more features at').' <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
echo '<div id="jsadvancedOptions" style="display:none">';
}
?>
@ -78,11 +78,11 @@
</div>
<button class="btn btn-blue" name="publish"><i class="fa fa-sun-o fa-right"></i><?php $Language->p('Save') ?></button>
<button class="btn btn-blue" name="publish"><i class="fa fa-sun-o fa-right"></i><?php echo ($_Page->published()?$Language->p('Save'):$Language->p('Publish now')) ?></button>
<?php if(count($_Page->children())===0) { ?>
<button class="btn" name="draft"><i class="fa fa-circle-o fa-right"></i><?php $Language->p('Draft') ?></button>
<button class="btn" name="delete"><i class="fa fa-remove fa-right"></i><?php $Language->p('Delete') ?></button>
<button id="jsdelete" class="btn" name="delete"><i class="fa fa-remove fa-right"></i><?php $Language->p('Delete') ?></button>
<?php } ?>
</form>
@ -121,6 +121,12 @@ $(document).ready(function()
checkSlugPage(text, parent, key, $("#jsslug"));
});
$("#jsdelete").click(function() {
if(!confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")) {
event.preventDefault();
}
});
});
</script>

View File

@ -20,7 +20,7 @@
}
else
{
echo '<p class="advOptions">'.$Language->p('Enable more features at').'<a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->p('settings-advanced-writting-settings').'</a></p>';
echo '<p class="advOptions">'.$Language->g('Enable more features at').' <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
echo '<div id="jsadvancedOptions" style="display:none">';
}
?>
@ -49,9 +49,9 @@
</label>
</div>
<button class="btn btn-blue" name="publish"><i class="fa fa-sun-o fa-right"></i><?php $Language->p('Save') ?></button>
<button class="btn btn-blue" name="publish"><i class="fa fa-sun-o fa-right"></i><?php echo ($_Post->published()?$Language->p('Save'):$Language->p('Publish now')) ?></button>
<button class="btn" name="draft"><i class="fa fa-circle-o fa-right"></i><?php $Language->p('Draft') ?></button>
<button class="btn" name="delete"><i class="fa fa-remove fa-right"></i><?php $Language->p('Delete') ?></button>
<button id="jsdelete" class="btn" name="delete"><i class="fa fa-remove fa-right"></i><?php $Language->p('Delete') ?></button>
</form>
@ -73,6 +73,12 @@ $(document).ready(function()
checkSlugPost(slug, key, $("#jsslug"));
});
$("#jsdelete").click(function() {
if(!confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")) {
event.preventDefault();
}
});
});
</script>

View File

@ -42,6 +42,11 @@ Editar usuario
1- Usuario logueado
2- Ver si el usuario es administrador o si es el mismo usuario que se esta editando.
—————————
New post->Publish->Manage posts
New page->Publish->Manage pages
Edit page->Save->Edit page
Edit post->Save->Edit post
—————————
- Friendly URL son Case sensitive.

View File

@ -48,6 +48,7 @@
"dasbhoard": "Dasbhoard",
"manage": "Manage",
"themes": "Themes",
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.",
"site-title": "Site title",
"site-slogan": "Site slogan",
"site-description": "Site description",