Fixes in admin
This commit is contained in:
parent
6fb13635b6
commit
9151645ad4
5 changed files with 48 additions and 11 deletions
|
|
@ -51,6 +51,8 @@ class GenerateAdminClass:
|
||||||
|
|
||||||
self.post_update=None
|
self.post_update=None
|
||||||
|
|
||||||
|
self.text_home=I18n.lang('common', 'home', 'Home')
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
|
|
||||||
getpostfiles=GetPostFiles()
|
getpostfiles=GetPostFiles()
|
||||||
|
|
@ -209,6 +211,8 @@ class GenerateConfigClass:
|
||||||
|
|
||||||
self.post_update=None
|
self.post_update=None
|
||||||
|
|
||||||
|
self.text_home=I18n.lang('common', 'home', 'Home')
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
|
|
||||||
getpostfiles=GetPostFiles()
|
getpostfiles=GetPostFiles()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<p><a href="${admin.url_redirect}">${lang('common', 'home', 'Home')}</a> >> \
|
<p><a href="${admin.url_redirect}">${admin.text_home|n}</a> >> \
|
||||||
% if id!='0':
|
% if id!='0':
|
||||||
${title_edit} \
|
${title_edit} \
|
||||||
%else:
|
%else:
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
% if not simplelist.table_div:
|
% if not simplelist.table_div:
|
||||||
|
|
||||||
<table class="table_list" id="${simplelist.model.name}_table">
|
<table class="table_list" id="${simplelist.model.name}_table">
|
||||||
<tr class="title_list">
|
<tr class="title_list">
|
||||||
% for field in simplelist.fields_showed:
|
% for field in simplelist.fields_showed:
|
||||||
|
|
@ -57,22 +58,30 @@
|
||||||
%>
|
%>
|
||||||
% endfor
|
% endfor
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
% else:
|
% else:
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
size_td=round(100/(len(simplelist.fields_showed)+len(simplelist.arr_extra_options)))
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
<div class="table_list" id="${simplelist.model.name}_table">
|
<div class="table_list" id="${simplelist.model.name}_table">
|
||||||
<div class="title_list ${simplelist.model.fields[field].name}_td">
|
<div class="${simplelist.model.name}_tr tr_list_div">
|
||||||
% for field in simplelist.fields_showed:
|
% for field in simplelist.fields_showed:
|
||||||
<span class="${simplelist.model.fields[field].name}_td fields_span_table"><a href="${add_get_parameters(simplelist.url, order_field=field, begin_page=simplelist.begin_page, order=simplelist.change_order[field], search_text=simplelist.search_text, search_field=simplelist.search_field)}" class="">${set_css_arrow(simplelist, field)}${simplelist.model.fields[field].label}</a></span>
|
<div class="${simplelist.model.fields[field].name}_td fields_span_title" style="width: ${size_td}%;"><a href="${add_get_parameters(simplelist.url, order_field=field, begin_page=simplelist.begin_page, order=simplelist.change_order[field], search_text=simplelist.search_text, search_field=simplelist.search_field)}" class="">${set_css_arrow(simplelist, field)}${simplelist.model.fields[field].label}</a></div>
|
||||||
% endfor
|
% endfor
|
||||||
% for extra_field in simplelist.arr_extra_fields:
|
% for extra_field in simplelist.arr_extra_fields:
|
||||||
<span class="options_td">${ extra_field }</span>
|
<div class="fields_span_title options_td" style="width: ${size_td}%;">${ extra_field }</div>
|
||||||
% endfor
|
% endfor
|
||||||
</div>
|
</div>
|
||||||
<div class="table_rows" id="${simplelist.model.name}_table">
|
<div class="table_rows ${simplelist.model.name}_table_rows" id="${simplelist.model.name}_table_rows">
|
||||||
<%
|
<%
|
||||||
pos=0
|
pos=0
|
||||||
%>
|
%>
|
||||||
% for row in list:
|
% for row in list:
|
||||||
|
<div id="${simplelist.model.name}_table_${row['id']}" class="${simplelist.model.name}_table_row">
|
||||||
<%
|
<%
|
||||||
if not 'pos' in row:
|
if not 'pos' in row:
|
||||||
row['pos']=pos
|
row['pos']=pos
|
||||||
|
|
@ -80,18 +89,19 @@
|
||||||
|
|
||||||
% for field in simplelist.fields_showed:
|
% for field in simplelist.fields_showed:
|
||||||
% if simplelist.model.fields[field].escape==True:
|
% if simplelist.model.fields[field].escape==True:
|
||||||
<span class="${simplelist.model.fields[field].name}_td fields_span_table_data">${simplelist.model.fields[field].show_formatted(row[field])}</span>
|
<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>
|
||||||
% else:
|
% else:
|
||||||
<span class="${simplelist.model.fields[field].name}_td">${str(simplelist.model.fields[field].show_formatted(row[field]))|n}<span>
|
<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>
|
||||||
% endif
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
% for extra_field_func in simplelist.arr_extra_options:
|
% for extra_field_func in simplelist.arr_extra_options:
|
||||||
<span class="options_td">${ simplelist.set_options(extra_field_func, row)|n }</span>
|
<div class="options_td fields_span_table_data" style="width: ${size_td}%;">${ simplelist.set_options(extra_field_func, row)|n }</div>
|
||||||
% endfor
|
% endfor
|
||||||
<%
|
<%
|
||||||
pos+=1
|
pos+=1
|
||||||
%>
|
%>
|
||||||
|
</div>
|
||||||
% endfor
|
% endfor
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ class SelectModelForm(SelectForm):
|
||||||
with self.model.select([self.field_name, self.field_value], True) as cur:
|
with self.model.select([self.field_name, self.field_value], True) as cur:
|
||||||
for arr_value in cur:
|
for arr_value in cur:
|
||||||
|
|
||||||
self.arr_select[arr_value[self.field_value]]=arr_value[self.field_name]
|
self.arr_select[arr_value[self.field_value]]=self.model.fields[self.field_name].show_formatted(arr_value[self.field_name])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,7 @@ margin-right:auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title_list td {
|
.title_list td, .fields_span_title {
|
||||||
|
|
||||||
margin:0px;
|
margin:0px;
|
||||||
padding:4px;
|
padding:4px;
|
||||||
|
|
@ -408,7 +408,23 @@ margin-right:auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.row_list td {
|
.fields_span_title, div.options_td , div.fields_span_table_data {
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
display:inline-block;
|
||||||
|
/*margin-top:4px;*/
|
||||||
|
/*border: solid #000 1px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.tr_list_div , div.fields_span_table_data {
|
||||||
|
|
||||||
|
margin-top:4px;
|
||||||
|
margin-left: 4px;
|
||||||
|
margin-right: 2px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.row_list td, div.fields_span_table_data {
|
||||||
|
|
||||||
/*border:solid #cccccc;
|
/*border:solid #cccccc;
|
||||||
border-width:1px;*/
|
border-width:1px;*/
|
||||||
|
|
@ -416,6 +432,13 @@ margin-right:auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.fields_span_table_data {
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.cont_text, .cont
|
.cont_text, .cont
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue