Dotclear


Ignore:
Timestamp:
04/09/13 09:08:48 (12 years ago)
Author:
Dsls <dsls@…>
Branch:
twig
Message:

Intermediate commit, needs to be better documented

  • introducing new dcListFetcher class for lists
  • Lists are now driving filters
  • forms tags are now defined in twig format
Location:
inc/admin/default-templates/forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/default-templates/forms/form_layout.html.twig

    r1153 r1154  
    126126{% endblock endlabel %} 
    127127 
     128{%- block beginform -%} 
     129<form {% if class is not empty -%} class="{{class|join(' ')}}" {%- endif %} {% if id is not empty -%} id="{{id}}" {%- endif %} 
     130 method="{{method}}" action="{{action}}"> 
     131{%- endblock beginform -%} 
     132 
     133{% block endform -%} 
     134</form> 
     135{%- endblock endform %} 
  • inc/admin/default-templates/forms/formfilter_layout.html.twig

    r1152 r1154  
    22 
    33 
    4 {% block filterset %} 
     4{% block filterset -%} 
    55<p> 
    66     <a href="#" id="toggle-filters">{{ __('Toggle filters and display options') }} </a> 
    77</p> 
    88<div class="two-cols"> 
    9 {% form filtersetname %} 
    10      {% set fenv = _context['filterset_' ~ filtersetname] %} 
     9{% set fenv = _context['filterset_' ~ filtersetname] %} 
     10{% form filtersetname with {'class':fenv.hide_filters?'hidden':'opened' } -%} 
    1111     <div class="col70"> 
    1212          <h3>{{__('Entries filters')}}</h3> 
    1313          <table summary="{{__('Query filters')}}" id="tfilters"> 
    1414          <tbody> 
    15                {% for f in fenv.active_filters %} 
     15               {%- for f in fenv.active_filters -%} 
    1616                    <tr class="{{f.id}}"> 
    1717                         <td>{{form_field(f.del_id)}}</td> 
    1818                         {{block(f.fwidget)}} 
    1919                    </tr> 
    20                {% endfor %} 
     20               {%- endfor -%} 
    2121          </tbody> 
    2222          </table> 
     
    3131     </div> 
    3232     <div class="col30"> 
    33           {% for f in fenv.static_filters %} 
     33          {%- for f in fenv.static_filters -%} 
    3434               {{block(f.fwidget)}} 
    35           {% endfor %} 
     35          {%- endfor -%} 
    3636     </div> 
    3737     <p class="clear margintop"></p> 
    38 {% endform %} 
     38{%- endform -%} 
    3939</div> 
    40 {% endblock %} 
     40{%- endblock %} 
    4141 
    4242 
    43 {% block filterenabled %} 
     43{% block filterenabled -%} 
    4444     <tr class="{{ id }}">'; 
    4545          <td> 
     
    4949          {{ block(filter) }} 
    5050     </tr> 
    51 {% endblock %} 
     51{%- endblock %} 
    5252 
    5353 
    54 {% block filter_combo %} 
     54{% block filter_combo -%} 
    5555     {% if f.display_inline is defined -%} 
    5656          <p id='{{f.filter_id}}'>{{form_field(f.ffield,{},{'label':f.desc,'nestedlabel': true, 'labelclass':'classic' })}}</p> 
     
    5959          <td >{{ form_field(f.ffield) }}</td> 
    6060     {%- endif %} 
    61 {% endblock %} 
     61{%- endblock %} 
    6262 
    63 {% block filter_combo_cont %} 
     63{% block filter_combo_cont -%} 
    6464     {% if f.display_inline is defined -%} 
    6565          <p id='{{filter_id}}'>{{form_field(f.ffield,{'label':__('or :')})}}</p> 
     
    6767          <td id='{{filter_id}}' colspan="2">{{ __('or :') }} </td><td>{{ form_field(f.ffield) }}</td> 
    6868     {%- endif %} 
    69 {% endblock %} 
     69{%- endblock %} 
    7070 
    7171 
    72 {% block filter_richcombo %} 
     72{% block filter_richcombo -%} 
    7373     <td id='{{filterd_id}}' title='{{f.desc}}' class="filter-title">{{f.desc}} : </td> 
    7474     <td>{{ form_field(f.fverb)}}</td> 
    7575     <td>{{ form_field(f.ffield) }}</td> 
    76 {% endblock %} 
     76{%- endblock %} 
    7777 
    7878 
    79 {% block filter_boolean %} 
     79{% block filter_boolean -%} 
    8080     <td id='{{filterd_id}}' title='{{f.desc}}' class="filter-title" colspan="2">{{f.desc}}</td> 
    8181     <td>{{ form_field(f.ffield) }}</td> 
    82 {% endblock %} 
     82{%- endblock %} 
    8383 
    84 {% block filter_text %} 
     84{% block filter_text -%} 
    8585     {% if f.display_inline is defined -%} 
    8686          <p id='{{filter_id}}'>{{form_field(f.ffield,{},{'label':f.desc,'nestedlabel': true, 'labelclass':'classic' })}}</p> 
     
    8888          <td id='{{filterd_id}}' title='{{f.desc}}' class="filter-title" colspan="2">{{f.desc}}</td> 
    8989          <td>{{ form_field(f.ffield) }}</td> 
    90      {% endif %} 
    91 {% endblock %} 
     90     {%- endif %} 
     91{%- endblock %} 
    9292 
    9393 
  • inc/admin/default-templates/forms/lists_layout.html.twig

    r1152 r1154  
    22{% set lenv = _context['list_' ~ listname] %} 
    33{% if lenv.entries %} 
     4<p>Pages:</p> 
    45{% form listname -%} 
    56{% spaceless %} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map