Moved admin templates to admin module
This commit is contained in:
parent
00f847a1d6
commit
9dbfc8daeb
6 changed files with 4 additions and 2 deletions
|
|
@ -1,4 +0,0 @@
|
|||
<%inherit file="home.html" />
|
||||
<%block name="content">
|
||||
${content_index|n}
|
||||
</%block>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>${title}</title>
|
||||
<!--<link href="{{'css/admin/admin.css'|make_media_url}}" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{'css/font-awesome.min.css'|make_media_url}}" rel="stylesheet" type="text/css"/>-->
|
||||
${add_css_home_local('admin.css', 'admin')}
|
||||
${add_css_home_local('font-awesome.min.css', 'admin')}
|
||||
${HeaderHTML.css_home()|n}
|
||||
${add_js_home_local('jquery.min.js', 'admin')}
|
||||
${HeaderHTML.js_home()|n}
|
||||
${HeaderHTML.header_home()|n}
|
||||
</head>
|
||||
<body>
|
||||
<div id="languages_general">
|
||||
</div>
|
||||
<div id="logout">
|
||||
<a href="${make_url('admin/logout')}">Logout</a>
|
||||
</div>
|
||||
|
||||
<div id="center_body">
|
||||
<div id="header"><span id="title_phango">Paramecio</span> <span id="title_framework">Framework!</span> </div>
|
||||
<div class="content_admin">
|
||||
<div id="menu">
|
||||
<div class="menu_title">${lang('admin', 'applications', 'Applications')}</div>
|
||||
% for module in sorted(menu):
|
||||
% if type(menu[module]).__name__=='list':
|
||||
<a href="${make_url('admin/'+module)}">${menu[module][0]}</a>
|
||||
% else:
|
||||
<div class="father_admin">${menu[module]}</div>
|
||||
% endif
|
||||
% endfor
|
||||
</div>
|
||||
<div class="contents">
|
||||
<h1>${title}</h1>
|
||||
<%block name="content">
|
||||
</%block>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loading_ajax">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<%inherit file="home.html"/>
|
||||
<%block name="content">
|
||||
<div class="title">
|
||||
Bienvenido al administrador
|
||||
</div>
|
||||
<div class="cont">
|
||||
Desde aquí podrá administrar su site
|
||||
</div>
|
||||
</%block>
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%block name="title">${lang('admin', 'login', 'Paramecio Login')}</%block></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
|
||||
${add_js_home_local('jquery.min.js', 'admin')}
|
||||
${add_css_home_local('login.css', 'admin')}
|
||||
${add_css_home_local('font-awesome.min.css', 'admin')}
|
||||
${HeaderHTML.css_home()|n}
|
||||
${HeaderHTML.js_home()|n}
|
||||
<%block name="ajax">
|
||||
<script language="javascript">
|
||||
$(document).ready( function () {
|
||||
|
||||
$('#login_submit').click( function () {
|
||||
|
||||
$('#loading').show();
|
||||
|
||||
$.ajax({
|
||||
url: "${make_url('admin/login')}",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: {'username': $('#username_form').val(), 'password': $('#password_form').val(), 'remember_login': $('#remember_login').val()}
|
||||
}).done(function(data) {
|
||||
|
||||
if(data.error==0)
|
||||
{
|
||||
|
||||
window.location.href="${make_url('admin')}";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$('#loading').hide('slow');
|
||||
|
||||
$('#username_error').html("${lang('common', 'error_login', 'Error, wrong username or password')}");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
</head>
|
||||
<body>
|
||||
<%block name="content">
|
||||
<form id="login">
|
||||
<div id="title">
|
||||
${lang('admin', 'login', 'Paramecio Login')}
|
||||
</div>
|
||||
${forms|n}
|
||||
<div class="form">${lang('admin', 'remember_login', 'Remember login?')} <input type="checkbox" id="remember_login" name="remember_login" value="1"></div>
|
||||
<div id="submit_block">
|
||||
<input type="submit" value="${lang('common', 'login', 'Login')}" class="submit" id="login_submit"/>
|
||||
<span id="loading"> </span>
|
||||
</div>
|
||||
</form>
|
||||
</%block>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
<%inherit file="login.phtml"/>
|
||||
<%block name="ajax">
|
||||
<script language="Javascript">
|
||||
$(document).ready( function () {
|
||||
|
||||
$("#register_submit").click( function () {
|
||||
|
||||
$.ajax({
|
||||
url: "${make_url('admin/register')}",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: {'username': $('#username_form').val(), 'email': $('#email_form').val(), 'password': $('#password_form').val(), 'repeat_password': $('#repeat_password_form').val()}
|
||||
}).done(function(data) {
|
||||
//$( this ).addClass( "done" );
|
||||
//Redirect if register
|
||||
|
||||
if(data.error==0)
|
||||
{
|
||||
|
||||
//$('#result_register').html('Done!. Redirecting...');
|
||||
$('#loading').show();
|
||||
|
||||
window.location.href="${make_url('admin/login')}";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//alert(JSON.stringify(data));
|
||||
//$('#result_register').html('Error');
|
||||
$('#username_error').html(data.username);
|
||||
$('#email_error').html(data.email);
|
||||
$('#password_error').html(data.password);
|
||||
|
||||
$('#repeat_password_error').html(data.password_repeat);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
<%block name="title">${lang('admin', 'sign_up', 'Paramecio Sign up')}</%block>
|
||||
<%block name="content">
|
||||
<form id="login">
|
||||
<div id="title">
|
||||
${lang('admin', 'sign_up', 'Paramecio Sign up')}
|
||||
</div>
|
||||
${forms|n}
|
||||
<div id="result_register"></div>
|
||||
<div id="submit_block">
|
||||
<input type="submit" value="${lang('common', 'sign_up', 'Sign up')}" class="submit" id="register_submit"/>
|
||||
<span id="loading"> </span>
|
||||
</div>
|
||||
</form>
|
||||
</%block>
|
||||
Loading…
Add table
Add a link
Reference in a new issue