Languages support
This commit is contained in:
parent
8037eada9b
commit
9f81946701
|
@ -20,7 +20,7 @@ function editPost($args)
|
||||||
if( $dbPosts->edit($args) )
|
if( $dbPosts->edit($args) )
|
||||||
{
|
{
|
||||||
Alert::set('The post has been saved successfull');
|
Alert::set('The post has been saved successfull');
|
||||||
Redirect::page('admin', 'manage-posts');
|
Redirect::page('admin', 'edit-post/'.$args['key']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<h2 class="title"><i class="fa fa-pencil"></i> <?php $Language->p('Edit page') ?></h2>
|
<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() ?>">
|
<input type="hidden" id="jskey" name="key" value="<?php echo $_Page->key() ?>">
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
}
|
}
|
||||||
else
|
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">';
|
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -78,12 +78,12 @@
|
||||||
|
|
||||||
</div>
|
</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) { ?>
|
<?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="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 } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -121,6 +121,12 @@ $(document).ready(function()
|
||||||
checkSlugPage(text, parent, key, $("#jsslug"));
|
checkSlugPage(text, parent, key, $("#jsslug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#jsdelete").click(function() {
|
||||||
|
if(!confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
|
@ -20,7 +20,7 @@
|
||||||
}
|
}
|
||||||
else
|
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">';
|
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -49,9 +49,9 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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="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>
|
</form>
|
||||||
|
|
||||||
|
@ -73,6 +73,12 @@ $(document).ready(function()
|
||||||
checkSlugPost(slug, key, $("#jsslug"));
|
checkSlugPost(slug, key, $("#jsslug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#jsdelete").click(function() {
|
||||||
|
if(!confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
|
@ -18,7 +18,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
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 '<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">';
|
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
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 '<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">';
|
echo '<div id="jsadvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -42,6 +42,11 @@ Editar usuario
|
||||||
1- Usuario logueado
|
1- Usuario logueado
|
||||||
2- Ver si el usuario es administrador o si es el mismo usuario que se esta editando.
|
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.
|
- Friendly URL son Case sensitive.
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
"dasbhoard": "Dasbhoard",
|
"dasbhoard": "Dasbhoard",
|
||||||
"manage": "Manage",
|
"manage": "Manage",
|
||||||
"themes": "Themes",
|
"themes": "Themes",
|
||||||
|
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.",
|
||||||
"site-title": "Site title",
|
"site-title": "Site title",
|
||||||
"site-slogan": "Site slogan",
|
"site-slogan": "Site slogan",
|
||||||
"site-description": "Site description",
|
"site-description": "Site description",
|
||||||
|
|
Loading…
Reference in New Issue