Changeset 687
- Timestamp:
- Oct 6, 2010, 1:55:47 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AppCoreController.groovy
r627 r687 63 63 def plugins = pluginProperties.collect{ it.key + '-' + it.value }.join(", ") 64 64 65 def sections = Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } 66 65 67 return [grailsVersion: grailsVersion, 66 68 applicationString: applicationString, 67 plugins: plugins] 69 plugins: plugins, 70 sections: sections] 68 71 } 69 72 -
trunk/grails-app/controllers/ReportController.groovy
r681 r687 144 144 params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL() 145 145 params.currentUser = authService.currentUser 146 if(params.asset.id == 'all') 147 params.asset = "All" 148 else 149 params.asset = Asset.get(params.asset.id.toLong()) 146 if(params.section.id == 'all') { 147 params.section = "All" 148 params.site = "All" 149 } 150 else { 151 params.section = Section.get(params.section.id.toLong()) 152 params.site = params.section.site 153 } 150 154 151 155 def dataModel = assetReportService.getAssetDetail(params, RCU.getLocale(request)) -
trunk/grails-app/services/AssetReportService.groovy
r686 r687 111 111 'left join asset.assetExtendedAttributes as attrib', 112 112 'left join attrib.extendedAttributeType as attribT' 113 if(params. asset instanceof Asset) {114 namedParams. asset = params.asset115 where 'asset = :asset'113 if(params.section instanceof Section) { 114 namedParams.section = params.section 115 where 'asset.section = :section' 116 116 } 117 117 order 'by asset.name asc, attribT.name asc' -
trunk/grails-app/views/appCore/start.gsp
r681 r687 143 143 format="PDF, XLS"> 144 144 <g:select optionKey="id" 145 from="${ Asset.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"146 name=" asset.id"145 from="${sections}" 146 name="section.id" 147 147 noSelection="['all':/${g.message(code:'default.all.select.text')}/]"> 148 148 </g:select> … … 155 155 format="PDF, XLS"> 156 156 <g:select optionKey="id" 157 from="${ Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"157 from="${sections}" 158 158 name="section.id"> 159 159 </g:select> … … 166 166 format="PDF, XLS"> 167 167 <g:select optionKey="id" 168 from="${ Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"168 from="${sections}" 169 169 name="section.id"> 170 170 </g:select> -
trunk/web-app/reports/assetDetail.jrxml
r653 r687 39 39 <parameter name="currentUser" class="java.lang.String"/> 40 40 <parameter name="logoUrl" class="java.lang.String"/> 41 <parameter name=" asset" class="java.lang.String"/>41 <parameter name="section" class="java.lang.String"/> 42 42 <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> 43 43 <defaultValueExpression><![CDATA["C:\\Documents and Settings\\kromhoutg\\My Documents\\reports\\"]]></defaultValueExpression> 44 44 </parameter> 45 <parameter name="site" class="java.lang.String"/> 45 46 <queryString language="SQL"> 46 47 <![CDATA[]]> … … 86 87 </background> 87 88 <pageHeader> 88 <band height=" 93" splitType="Stretch">89 <textField isStretchWithOverflow="true"> 90 <reportElement key="staticText-1" stretchType="RelativeToTallestObject" x=" 0" y="57" width="340" height="20" isPrintWhenDetailOverflows="true"/>89 <band height="60" splitType="Stretch"> 90 <textField isStretchWithOverflow="true"> 91 <reportElement key="staticText-1" stretchType="RelativeToTallestObject" x="352" y="9" width="225" height="20" isPrintWhenDetailOverflows="true"/> 91 92 <textElement textAlignment="Center" verticalAlignment="Top" markup="none"> 92 93 <font fontName="Serif" size="14"/> … … 99 100 </image> 100 101 <textField isStretchWithOverflow="true"> 101 <reportElement stretchType="RelativeToTallestObject" x="0" y="77" width="340" height="12" isPrintWhenDetailOverflows="true"> 102 <printWhenExpression><![CDATA[$P{asset}.equals( "All" )]]></printWhenExpression> 103 </reportElement> 102 <reportElement stretchType="RelativeToTallestObject" x="352" y="29" width="225" height="15" isPrintWhenDetailOverflows="true"/> 104 103 <textElement textAlignment="Center" verticalAlignment="Middle"> 105 <font fontName="Serif" size=" 8"/>106 </textElement> 107 <textFieldExpression class="java.lang.String"><![CDATA[" For All Assets"]]></textFieldExpression>104 <font fontName="Serif" size="10"/> 105 </textElement> 106 <textFieldExpression class="java.lang.String"><![CDATA["Site: "+$P{site}+", "+"Section: "+$P{section}]]></textFieldExpression> 108 107 </textField> 109 108 </band>
Note: See TracChangeset
for help on using the changeset viewer.