Il 01/03/2010 20:37, Fabrizio Rota ha scritto:
possiam vedere il pt? :-)

nulla di particolare, sono comunque graditi commenti, il mio codice è spesso quick and dirty, soprattutto dirty:

<tal:block define="m python:request.materia.split('.')">
<tal:block tal:repeat="mate python:context.Scrutini_select_materia(idmateria=m[0], scuola=m[1], idclasse=m[2])"> <h2>Inserimento dati Classe: <span style="font-weight:bold" tal:content="python:mate.classe+mate.sezione">CLASSE</span> - Materia: <span style="font-weight:bold" tal:content="mate/desMateria">MATERIA</span>
  </h2>
<tal:block tal:repeat="bloccata python:context.Scrutini_select_classe_attiva(idclasse=m[2])">
     <p>In questo momento la possibilità di apportare modifiche ai dati è:
<strong tal:attributes="style python:test(bloccata.bloccata=='N', 'color:#0c0', 'color:#f00')" tal:content="python:test(bloccata.bloccata=='N', 'ATTIVA', 'DISATTIVA')"></strong></p>


  <span tal:define="global cl python:str(m[2])"></span>
  <span tal:define="global mt python:str(m[0])"></span>

 </tal:block>
</tal:block>

// da qui in poi si vede solo su IE e FireBug

  <p>&nbsp;</p>
    <table class='orario'>
     <form name="daticlasse" method="post" action="memorizza">
      <tbody>
<tr tal:repeat="alunno python:context.Scrutini_select_alunni(idclasse=cl)">
        <th class='orario'>
           <span tal:content="alunno/Cognome">c</span><br />
           <span tal:content="alunno/Nome">n</span>
           <span tal:define="global idalu alunno/idalunno"></span>
        </th>
        <td style="padding:0.5em">
<div class="nonsuff" style="background-color:#ffdfdf; padding:0.5em; margin-bottom:0.2em; border:thin dashed #900"> <p>compilare questo riquadro solo se in pagella riporta voto inferiore a 6</p>
           <p>Motivi di insufficienza:<br />
<label tal:attributes="for string:cb-${idalu}-${cl}-${mt}" title="Inadeguatezza del metodo di studio">IM </label> <input type="checkbox" tal:attributes="name string:cb-${idalu}-${cl}-${mt}; checked python:test(context.motivi(idalu,mt,'IM') == 'trovato', 'checked', nothing)" value="IM" />&nbsp;&nbsp; <label tal:attributes="for string:cb-${idalu}-${cl}-${mt}" title="Insufficiente studio">IS </label> <input type="checkbox" tal:attributes="name string:cb-${idalu}-${cl}-${mt}; checked python:test(context.motivi(idalu,mt,'IS') == 'trovato', 'checked', nothing)" value="IS" />&nbsp;&nbsp; <label tal:attributes="for string:cb-${idalu}-${cl}-${mt}" title="Mancanza di interesse">MI </label> <input type="checkbox" tal:attributes="name string:cb-${idalu}-${cl}-${mt}; checked python:test(context.motivi(idalu,mt,'MI') == 'trovato', 'checked', nothing)" value="MI" />&nbsp;&nbsp; <label tal:attributes="for string:cb-${idalu}-${cl}-${mt}" title="Numero elevato di assenze">AE </label> <input type="checkbox" tal:attributes="name string:cb-${idalu}-${cl}-${mt}; checked python:test(context.motivi(idalu,mt,'AE') == 'trovato', 'checked', nothing)" value="AE" />&nbsp;&nbsp; <label tal:attributes="for string:cb-${idalu}-${cl}-${mt}" title="Lacune di base">LB </label> <input type="checkbox" tal:attributes="name string:cb-${idalu}-${cl}-${mt}; checked python:test(context.motivi(idalu,mt,'LB') == 'trovato', 'checked', nothing)" value="LB" />&nbsp;&nbsp; <label tal:attributes="for string:cb-${idalu}-${cl}-${mt}" title="Difficoltà specifiche nella disciplina">DD </label> <input type="checkbox" tal:attributes="name string:cb-${idalu}-${cl}-${mt}; checked python:test(context.motivi(idalu,mt,'DD') == 'trovato', 'checked', nothing)" value="DD" />&nbsp;&nbsp; <label tal:attributes="for string:cb-${idalu}-${cl}-${mt}" title="Difficoltà di esposizione">DE </label> <input type="checkbox" tal:attributes="name string:cb-${idalu}-${cl}-${mt}; checked python:test(context.motivi(idalu,mt,'DE') == 'trovato', 'checked', nothing)" value="DE" />
           </p>
<p>ARGOMENTI in cui non sono stati raggiunti i livelli minimi:<br /> <textarea rows="5" cols="80" tal:attributes="name string:ta-${idalu}-${cl}-${mt}-cm"
             tal:content="python: context.indicazioni(idalu,mt,'cm')">
            </textarea>
           </p>
          </div>
<div class="suff" style="background-color:#dfffdf; padding:0.5em; border:thin dashed">
           <p>ARGOMENTI su cui svolgere studio autonomo individuale:<br />
<textarea rows="5" cols="80" tal:attributes="name string:ta-${idalu}-${cl}-${mt}-si"
             tal:content="python: context.indicazioni(idalu,mt,'si')">
            </textarea>
           </p>
          </div>
        </td>
       </tr>
      </tbody>
      <tfoot>
       <tr>
<td colspan="2" style="text-align:center; padding:0.5em; margin:1.5em 1.5em" > <input name="invialo" type="submit" value="Memorizza le indicazioni" />
        </td>
       </tr>
      </tfoot>
     </form>
    </table>

</tal:block>


Questa cosa non mi è mai capitata, interessante!
>
+1 :-D


--
A  presto
-Valerio-


_______________________________________________
Plone-IT mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html

Rispondere a