This commit is contained in:
Antonio de la Rosa 2019-02-13 20:02:09 +01:00
parent 9151645ad4
commit 53c51de02b
4 changed files with 28 additions and 21 deletions

View file

@ -52,7 +52,7 @@ class LoginPlugin(object):
#Check if remember_login cookie
#, secret=config.key_encrypt
redirect(make_url(login_url))
redirect(make_url(self.login_url))
# Replace the route callback with the wrapped one.
return wrapper

View file

@ -35,24 +35,6 @@ choose=''
</div>
<script>
/*
$(".${name_form}_i18n_flag").click(function () {
$('.${name_form}_i18n_flag').removeClass('choose_flag').addClass('no_choose_flag');
$(this).addClass('choose_flag');
name_id=$(this).attr('id').replace('_element', '');
name_form="${name_form}";
$('.'+name_form+'_i18n_form').hide();
$('#'+name_id+'_switch').show();
return false;
});*/
//In submit convert in json

View file

@ -43,9 +43,17 @@
<tr class="row_list">
% for field in simplelist.fields_showed:
% if simplelist.model.fields[field].escape==True:
%if type(simplelist.model.fields[field]).__name__!='ForeignKeyField':
<td class="${simplelist.model.fields[field].name}_td">${simplelist.model.fields[field].show_formatted(row[field])}</td>
% else:
<td class="${simplelist.model.fields[field].name}_td">${simplelist.model.fields[field].show_formatted(row[field])}${str(simplelist.model.fields[field].related_model.fields[simplelist.model.fields[field].named_field].show_formatted(row[field]))}</td>
% endif
% else:
%if type(simplelist.model.fields[field]).__name__!='ForeignKeyField':
<td class="${simplelist.model.fields[field].name}_td">${str(simplelist.model.fields[field].show_formatted(row[field]))|n}</td>
% else:
<td class="${simplelist.model.fields[field].name}_td">${str(simplelist.model.fields[field].related_model.fields[simplelist.model.fields[field].named_field].show_formatted(row[field]))|n}</td>
% endif
% endif
% endfor
@ -89,9 +97,21 @@ size_td=round(100/(len(simplelist.fields_showed)+len(simplelist.arr_extra_option
% for field in simplelist.fields_showed:
% if simplelist.model.fields[field].escape==True:
<div class="${simplelist.model.fields[field].name}_td fields_span_table_data" style="width: ${size_td}%;">${simplelist.model.fields[field].show_formatted(row[field])}</div>
<div class="${simplelist.model.fields[field].name}_td fields_span_table_data" style="width: ${size_td}%;">
%if type(simplelist.model.fields[field]).__name__!='ForeignKeyField':
${simplelist.model.fields[field].show_formatted(row[field])}
% else:
${str(simplelist.model.fields[field].related_model.fields[simplelist.model.fields[field].named_field].show_formatted(row[field]))}
% endif
</div>
% else:
<div class="${simplelist.model.fields[field].name}_td fields_span_table_data" style="width: ${size_td}%;">${str(simplelist.model.fields[field].show_formatted(row[field]))|n}</div>
<div class="${simplelist.model.fields[field].name}_td fields_span_table_data" style="width: ${size_td}%;">
%if type(simplelist.model.fields[field]).__name__!='ForeignKeyField':
${str(simplelist.model.fields[field].show_formatted(row[field]))|n}
% else:
${str(simplelist.model.fields[field].related_model.fields[simplelist.model.fields[field].named_field].show_formatted(row[field]))|n}
% endif
</div>
% endif
% endfor
@ -104,6 +124,7 @@ size_td=round(100/(len(simplelist.fields_showed)+len(simplelist.arr_extra_option
</div>
% endfor
</div>
<br clear="all" />
</div>
% endif

View file

@ -392,6 +392,7 @@ margin-right:auto;
border:solid #cccccc;
border-width:1px;
margin:0px;
box-sizing: border-box;
}
@ -405,6 +406,8 @@ margin-right:auto;
background: #ccc;
font-size:14px;
font-weight:bold;
box-sizing: border-box;
/*border: solid #000 1px;*/
}
@ -412,6 +415,7 @@ margin-right:auto;
box-sizing: border-box;
display:inline-block;
float:left;
/*margin-top:4px;*/
/*border: solid #000 1px;*/
}