121 lines
4.7 KiB
Plaintext
121 lines
4.7 KiB
Plaintext
<cfsilent>
|
|
<cfimport prefix="m" taglib="lib"/>
|
|
<cfimport prefix="c" taglib="lib/controls"/>
|
|
<cfimport prefix="d" taglib="lib/data"/>
|
|
<cfimport prefix="layout" taglib="layout"/>
|
|
</cfsilent><m:silent silent="No">
|
|
|
|
<m:prepare_ls entity="area" pageInfoOut="pageInfo" trackOut="tr"/>
|
|
|
|
<m:filter_settings target="#pageInfo.entity#_ls">
|
|
<m:filterparam filter=#filter# param="quickfilter" ftype="string" prefix="%" suffix="%" expression="((p.project like ?) OR (p.customer like ?) OR (p.customer_alias like ?) OR (p.area_class_type like ?) OR (p.division like ?) OR (p.performer_short like ?))" default=""/>
|
|
</m:filter_settings>
|
|
<cfset pageInfo.settings.filter=#filter#/>
|
|
|
|
<cftry>
|
|
<cfquery name="qRead" datasource="#request.DS#">
|
|
select
|
|
<d:field_set titleMapOut="titleMap" lengthOut="fieldCount">
|
|
<d:field title="ID" cfSqlType="CF_SQL_INTEGER">m.area_id</d:field>
|
|
<d:field title="Код группы">m.area_code</d:field>
|
|
<d:field title="Аналитический код">m.analytic_code</d:field>
|
|
<d:field title="Группа">m.area</d:field>
|
|
</d:field_set>
|
|
from area m
|
|
where 1=1 <m:filter_build filter=#pageInfo.settings.filter#/>
|
|
order by <m:order_build sortArray=#pageInfo.settings.sort.sortArray# fieldCount=#fieldCount#/>
|
|
</cfquery>
|
|
|
|
|
|
<cfcatch type="database">
|
|
<m:ls_catch catch=#cfcatch# status=#pageInfo.status#/>
|
|
</cfcatch>
|
|
</cftry>
|
|
|
|
<cfquery name="qCountTotal" datasource="#request.DS#">
|
|
select count(*) as cnt from area where 1=1
|
|
</cfquery>
|
|
|
|
</m:silent><!---
|
|
-----------------------------------------------------------------------------------------
|
|
-----------------------------------------------------------------------------------------
|
|
-----------------------------------------------------------------------------------------
|
|
---><cfif isDefined("output_xls")>
|
|
<layout:xml qRead=#qRead# titleMap=#titleMap# filename="#pageInfo.entity#.xml"/>
|
|
<cfabort/>
|
|
</cfif><cfif isDefined("output_json")>
|
|
<layout:json qRead=#qRead# titleMap=#titleMap# filename="#pageInfo.entity#.json"/>
|
|
<cfabort/>
|
|
</cfif><!---
|
|
---><layout:page section="header" pageInfo=#pageInfo#>
|
|
|
|
<layout:attribute name="title">
|
|
<cfoutput><b>Группы каталога</b></cfoutput>
|
|
</layout:attribute>
|
|
</layout:page>
|
|
|
|
<cfif pageInfo.readPermitted() AND !pageInfo.status.errorState>
|
|
|
|
<layout:grid_summary
|
|
recordCount=#qRead.recordCount#
|
|
totalCount=#qCountTotal.cnt#
|
|
footerOut="gridFooter"
|
|
excelLink="Yes"
|
|
jsonLink="Yes"
|
|
/>
|
|
|
|
<cfscript>
|
|
function uc(x) {return UCase(x);}
|
|
</cfscript>
|
|
|
|
<c:grid query=#qRead# titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray# class="worktable">
|
|
<c:column width="1%">
|
|
<c:th><c:link_add canWrite=#pageInfo.writePermitted()# entity=#pageInfo.entity# fwx=#tr.fwx#/></c:th>
|
|
<c:td>
|
|
<!---<c:link_view_edit canWrite="#CALLER.pageInfo.writePermitted()#" entity="#CALLER.pageInfo.entity#" id=#qRead.area_id# fwx="#CALLER.tr.fwx#"/>--->
|
|
<a href="#CALLER.pageInfo.entity#.cfm?#CALLER.pageInfo.entity#_id=#area_id#&#CALLER.tr.fwx#" name="#area_id#" <cfif pageInfo.writePermitted()>title="редактировать" class="edit"<cfelse>title="просмотр" class="view"</cfif>></a>
|
|
</c:td>
|
|
</c:column>
|
|
<c:column width="3%" lang="en">
|
|
<c:th field="area_id">rrrrrrr</c:th>
|
|
<c:td>(#area_id#)</c:td>
|
|
</c:column>
|
|
<c:column width="5%" field="area_code">_#area_code#_</c:column>
|
|
<c:column width="5%" field="area_code"></c:column>
|
|
<c:column width="5%" field="area_code"/>
|
|
<!---<c:column width="80%" field="area" formatter=#function (x) {return UCase(x)}#/>---><!---длинно--->
|
|
<c:column width="80%" field="area" formatter=#uc#/><!---если переиспользовать форматтер на той же странице, можно так--->
|
|
</c:grid>
|
|
|
|
<!--- <table class="worktable">
|
|
|
|
<thead>
|
|
<layout:grid_head titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray#>
|
|
<th width="1%">
|
|
<c:link_add canWrite=#pageInfo.writePermitted()# entity=#pageInfo.entity# fwx=#tr.fwx#/>
|
|
</th>
|
|
<th width="3%"><layout:column_head name="area_id"/></th>
|
|
<th width="5%"><layout:column_head name="area_code"/></th>
|
|
<th width="80%"><layout:column_head name="area"/></th>
|
|
</layout:grid_head>
|
|
</thead>
|
|
|
|
<cfoutput query="qRead" maxrows=#pageInfo.recordsPerPage# startrow=#pageInfo.nStart#>
|
|
<tr>
|
|
<td class="c">
|
|
<c:link_view_edit canWrite=#pageInfo.writePermitted()# entity=#pageInfo.entity# id=#qRead[pageInfo.entity&'_id'][currentRow]# fwx=#tr.fwx#/>
|
|
</td>
|
|
<td class="c">#area_id#</td>
|
|
<td>#area_code#</td>
|
|
<td>#area#</td>
|
|
</tr>
|
|
</cfoutput>
|
|
|
|
</table>--->
|
|
|
|
<cfoutput>#gridFooter#</cfoutput>
|
|
|
|
|
|
|
|
</cfif>
|
|
<layout:page section="footer"/> |