Hello Kevin--------------------------Proyecto.rbhas_many: 
plan_operativos-----------------Plan_Operativo.rbcant:decimalbelongs_to: 
proyecto--------------------
this code in application.dryml>
<def tag="show-page" for="Proyecto">  <page merge title="#{ht 
'proyecto.show.title', :default=>['Proyecto'] }">
    <body: class="show-page proyecto" param/>
    <content: param>          <header param="content-header">            
<a:epserv param="parent-link">« <ht key="proyecto.actions.back_to_parent" 
parent="EPS" name="&this">Back to <name/></ht></a:epserv>            <h2 
param="heading">              <ht key="proyecto.show.heading" 
name="&this.respond_to?(:name) ? this.name : ''">                <name/>        
      </ht>            </h2>
            <record-flags fields="" param/>
            <a action="edit" if="&can_edit?" param="edit-link">              
<ht key="proyecto.actions.edit" name="&this.respond_to?(:name) ? this.name : 
''">                Edit Proyecto              </ht>            </a>          
</header>
          <section param="content-body">            <field-list 
fields="codigoadm, proyecto, proyectado_hombres, proyectado_mujeres, 
real_hombres, real_mujeres, anio, fecha_inicio, fecha_final, status, 
monto_total_aprobado, monto_delap_aprobado, monto_gbeneficiario_aprobado, 
monto_total_ejecutado, monto_delap_ejecutado, monto_gbeneficiario_ejecutado, 
ubic_fis, comentario, municipio, rubro, tecnico" param/>          <!--- Plan 
Operativo Indicadores -->                   <section 
param="collection-section">              <h3 param="collection-heading">        
        <ht key="plan_operativo.collection.heading" 
count="&this.plan_operativos.count" >                  <human-collection-name 
collection="plan_operativos" your/>                </ht>              </h3>     
         <!-- <collection:plan_operativos param>  --> <!-------this line is 
original code works fine instead of -->                            <!--------  
NEXT CODE TO FIX ---------change to table-plus need-------------------->        
      <collection plan_operativos param>                <div>                  
<view field="sum(:cant)"/>                  </div>              </collection>   
                                <div>              total:         <!--- Sum 
Total of Collecction --->              </div>         <!------------ END- CODE 
FIX -------------------------------------->                     
<a:plan_operativos action="new" if="&can_create?(@proyecto.plan_operativos)" 
param="new-link">                <ht key="plan_operativo.actions.new" 
count="1">                  New Plan_operativo                </ht>             
 </a:plan_operativos>            </section>        <!-- Fin PlanOperativo 
Indicadores -->                     <section param="collection-section">        
      <h3 param="collection-heading">                <ht 
key="documento.collection.heading" count="&this.documentos.count" >             
     <human-collection-name collection="documentos" your/>                </ht> 
             </h3>
              <collection:documentos param/>
              <a:documentos action="new" 
if="&can_create?(@proyecto.documentos)" param="new-link">                <ht 
key="documento.actions.new" count="1">                  New Documento           
     </ht>              </a:documentos>            </section>          
</section>    </content:>
  </page></def>



Date: Tue, 16 Aug 2011 14:48:04 -0700
From: [email protected]
To: [email protected]
Subject: [Hobo Users] Re: FW: Sum a atributte on collection tag Not ideas?

Honestly not sure what you're asking.  You want to display a sum from a child 
relation?  <view field="association_name.sum(:column_name_to_sum)" />




-- 

You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.

To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/ZBZtCOFs4CcJ.
 
To post to this group, send email to [email protected].

To unsubscribe from this group, send email to 
[email protected].


For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.
                                          

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to