Initial commit

This commit is contained in:
root
2026-01-19 17:44:46 +01:00
commit 823af8b11d
8721 changed files with 1130846 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<% _.each(layout, function (row, rowNumber) { %>
<div class="col-sm-6">
<% _.each(row, function (defs, key) { %>
<%
var tag = 'tag' in defs ? defs.tag : 'div';
print( '<' + tag);
if ('id' in defs) {
print(' id="'+defs.id+'"');
}
print(' class="');
if ('class' in defs) {
print(defs.class);
};
print('"');
print('>');
%>
{{{this.<%= defs.name %>}}}
<%= '</' + tag + '>' %>
<% }); %>
</div>
<% }); %>

View File

@@ -0,0 +1,14 @@
<% _.each(layout, function (defs, key) {
var tag = 'tag' in defs ? defs.tag : 'div';
print( '<' + tag);
if ('id' in defs) {
print(' id="'+defs.id+'"');
}
if ('class' in defs) {
print(' class="'+defs.class+'"');
}
print('>');
%>
{{{this.<%= defs.name %>}}}
<%= '</' + tag + '>' %>
<% }); %>

View File

@@ -0,0 +1,23 @@
<% if (layout.right) { %>
<div class="pull-right right cell" data-name="buttons">
{{{<%= layout.right.name %>}}}
</div>
<% } %>
<% _.each(layout.rows, function (row, key) { %><div class="expanded-row"><% _.each(row, function (defs, key) { %><span class="cell<%= defs.align ? ' pull-right' : '' %><%= defs.small ? ' small' : '' %><%= defs.soft ? ' text-soft' : '' %>" data-name="<%= defs.field %>"><%
var tag = 'tag' in defs ? defs.tag : false;
if (tag) {
print( '<' + tag);
if ('id' in defs) {
print(' id="'+defs.id+'"');
}
if ('class' in defs) {
print(' class="'+defs.class+'"');
};
print('>');
}
%>{{{this.<%= defs.name %>}}}<%
if (tag) {
print( '</' + tag + '>');
}
%></span><% }); %></div>
<% }); %>

View File

@@ -0,0 +1,44 @@
<% _.each(layout, function (defs, key) { %>
<%
let width = null;
if (defs.options && defs.options.defs && defs.options.defs.width !== undefined) {
width = (defs.options.defs.width + '%') || null;
}
if (defs.options && defs.options.defs && defs.options.defs.widthPx !== undefined) {
width = defs.options.defs.widthPx || null;
}
let align = false;
if (defs.options && defs.options.defs) {
align = defs.options.defs.align || false;
}
%>
<td
class="cell"
data-name="<%= defs.columnName %>"
<% if (width || align) { %>
style="<% if (width) print('width: ' + width); %>;<% if (align) print(' text-align: ' + align);%>"
<% } %>
>
<%
var tag = 'tag' in defs ? defs.tag : false;
if (tag) {
print( '<' + tag);
if ('id' in defs) {
print(' id="'+defs.id+'"');
}
if ('class' in defs) {
print(' class="'+defs.class+'"');
};
print('>');
}
%>{{{this.<%= defs.name %>}}}<%
if (tag) {
print( '</' + tag + '>');
}
%>
</td>
<% }); %>

View File

@@ -0,0 +1,188 @@
<% var hasHiddenPanel = false; %>
<% _.each(layout, function (panel, columnNumber) { %>
<% hasHiddenPanel = panel.hidden || hasHiddenPanel; %>
<div
class="panel panel-<%= panel.style %><%= panel.label ? ' headered' : '' %><%= panel.tabNumber ? ' tab-hidden' : '' %><% if (panel.name) { %>{{#if hiddenPanels.<%= panel.name %>}} hidden{{/if}}<% } %>"
<% if (panel.name) print('data-name="'+panel.name+'"') %>
<% if (panel.style) print('data-style="'+panel.style+'"') %>
data-tab="<%= panel.tabNumber %>"
>
<% if (panel.label) { %>
<div class="panel-heading"><h4 class="panel-title"><%= panel.label %></h4></div>
<% } %>
<div class="panel-body panel-body-form">
<% if (panel.noteText) { %>
<div class="alert alert-<%= panel.noteStyle %>"><%= panel.noteText %></div>
<% } %>
<% var rows = panel.rows || [] %>
<% var columns = panel.columns || [] %>
<% _.each(rows, function (row, rowNumber) { %>
<div class="row">
<% var columnCount = row.length; %>
<% _.each(row, function (cell, cellNumber) { %>
<%
var spanClassBase;
if (columnCount === 1) {
spanClassBase = 'col-sm-12';
} else if (columnCount === 2) {
spanClassBase = 'col-sm-6';
} else if (columnCount === 3) {
spanClassBase = 'col-sm-4';
} else if (columnCount === 4) {
spanClassBase = 'col-md-3 col-sm-6';
} else {
spanClass = 'col-sm-12';
}
%>
<% if (cell != false) { %>
<%
var spanClass;
if (columnCount === 1 || cell.fullWidth) {
spanClass = 'col-sm-12';
} else if (columnCount === 2) {
if (cell.span === 2) {
spanClass = 'col-sm-12';
} else {
spanClass = 'col-sm-6';
}
} else if (columnCount === 3) {
if (cell.span === 2) {
spanClass = 'col-sm-8';
} else if (cell.span === 3) {
spanClass = 'col-sm-12';
} else {
spanClass = 'col-sm-4';
}
} else if (columnCount === 4) {
if (cell.span === 2) {
spanClass = 'col-sm-6';
} else if (cell.span === 3) {
spanClass = 'col-sm-9';
} else if (cell.span === 4) {
spanClass = 'col-sm-12';
} else {
spanClass = 'col-md-3 col-sm-6';
}
} else {
spanClass = 'col-sm-12';
}
%>
<div
class="cell <%= spanClass %> form-group<% if (cell.field) { %>{{#if hiddenFields.<%= cell.field %>}} hidden-cell{{/if}}<% } %>"
data-name="<%= cell.field %>"
tabindex="-1"
>
<% if (!cell.noLabel) { %><label class="control-label<% if (cell.field) { %>{{#if hiddenFields.<%= cell.field %>}} hidden{{/if}}<% } %>" data-name="<%= cell.field %>"><span class="label-text"><%
if ('customLabel' in cell) {
print (cell.customLabel);
} else {
var label = cell.label || cell.field;
print ("{{translate \""+label+"\" scope=\""+model.name+"\" category='fields'}}");
}
%></span></label><% } %>
<div class="field<% if (cell.field) { %>{{#if hiddenFields.<%= cell.field %>}} hidden{{/if}}<% } %>" data-name="<%= cell.field %>"><%
if ('customCode' in cell) {
print (cell.customCode);
} else {
print ("{{{this."+cell.name+"}}}");
}
%></div>
</div>
<% } else { %>
<div class="<%= spanClassBase %>"></div>
<% } %>
<% }); %>
</div>
<% }); %>
<%
var columnCount = columns.length;
if (columnCount) {
%>
<div class="row">
<%
}
%>
<% _.each(columns, function (column, columnNumber) { %>
<%
var spanClass;
if (!columnCount) return;
if (columnCount === 1 || column.fullWidth) {
spanClass = 'col-sm-12';
} else if (columnCount === 2) {
if (column.span === 2) {
spanClass = 'col-sm-12';
} else {
spanClass = 'col-sm-6';
}
} else if (columnCount === 3) {
if (column.span === 2) {
spanClass = 'col-sm-8';
} else if (column.span === 3) {
spanClass = 'col-sm-12';
} else {
spanClass = 'col-sm-4';
}
} else if (columnCount === 4) {
if (column.span === 2) {
spanClass = 'col-sm-6';
} else if (column.span === 3) {
spanClass = 'col-sm-9';
} else if (column.span === 4) {
spanClass = 'col-sm-12';
} else {
spanClass = 'col-md-3 col-sm-6';
}
} else {
spanClass = 'col-sm-12';
}
%>
<div class="column <%= spanClass %>">
<% _.each(column, function (cell, cellNumber) { %>
<div class="cell form-group<% if (cell.field) { %>{{#if hiddenFields.<%= cell.field %>}} hidden-cell{{/if}}<% } %>" data-name="<%= cell.field %>">
<% if (!cell.noLabel) { %><label class="control-label<% if (cell.field) { %>{{#if hiddenFields.<%= cell.field %>}} hidden{{/if}}<% } %>" data-name="<%= cell.field %>"><span class="label-text"><%
if ('customLabel' in cell) {
print (cell.customLabel);
} else {
print ("{{translate \""+cell.field+"\" scope=\""+model.name+"\" category='fields'}}");
}
%></span></label><% } %>
<div class="field<% if (cell.field) { %>{{#if hiddenFields.<%= cell.field %>}} hidden{{/if}}<% } %>" data-name="<%= cell.field %>"><%
if ('customCode' in cell) {
print (cell.customCode);
} else {
print ("{{{this."+cell.name+"}}}");
}
%></div>
</div>
<% }); %>
</div>
<% }); %>
<%
if (columnCount) {
%>
</div>
<%
}
%>
</div>
</div>
<% }); %>
<%
if (hasHiddenPanel) {
%>
<div class="panel panel-default panels-show-more-delimiter" data-name="showMoreDelimiter" data-tab="0">
<a role="button" tabindex="0" data-action="showMoreDetailPanels" title="{{translate 'Show more'}}">
<span class="fas fa-ellipsis-h fa-lg"></span>
</a>
</div>
<%
}
%>