Dotclear


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

form filters reloaded, first try for lists (to be completed)
form fields now support multiple values.

Location:
inc/admin/default-templates
Files:
2 added
1 edited
2 moved

Legend:

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

    r1148 r1152  
    4848 
    4949{% block field_checkbox %} 
    50 {% spaceless %} 
     50{% set type = type|default('checkbox') %} 
     51{% set nestedlabel = true %} 
     52{% set labelclass = "classic" %} 
     53    {{ block('field_input') }} 
     54{#{% spaceless %} 
     55 
    5156     {% if label is not empty %} 
    5257          <label for="{{name}}" class="classic"> 
     
    5661          {{ label }}</label> 
    5762     {% endif %} 
    58 {% endspaceless %} 
     63{% endspaceless %}#} 
    5964{% endblock field_checkbox %} 
    6065 
     
    105110    {% if label is not empty %} 
    106111        {% if required is not empty %} 
    107             {% set labelclass = labelclass + " required" %} 
     112            {% set labelclass = labelclass ~ " required" %} 
    108113        {% endif %} 
    109114        <label for="{{name}}" {% if labelclass is not empty %}class="{{labelclass}}"{% endif %} {% if required is not empty %}<abbr title="{{__('Required field')}}">*</abbr>{% else %}>{% endif %} {{label}} 
  • inc/admin/default-templates/forms/formfilter_layout.html.twig

    r1147 r1152  
    3131     </div> 
    3232     <div class="col30"> 
     33          {% for f in fenv.static_filters %} 
     34               {{block(f.fwidget)}} 
     35          {% endfor %} 
    3336     </div> 
    3437     <p class="clear margintop"></p> 
     
    5053 
    5154{% block filter_combo %} 
     55     {% if f.display_inline is defined -%} 
     56          <p id='{{f.filter_id}}'>{{form_field(f.ffield,{},{'label':f.desc,'nestedlabel': true, 'labelclass':'classic' })}}</p> 
     57     {%- else -%} 
     58          <td id='{{f.filter_id}}' title='{{f.desc}}' class="filter-title" colspan="2">{{f.desc}} : </td> 
     59          <td >{{ form_field(f.ffield) }}</td> 
     60     {%- endif %} 
     61{% endblock %} 
     62 
     63{% block filter_combo_cont %} 
     64     {% if f.display_inline is defined -%} 
     65          <p id='{{filter_id}}'>{{form_field(f.ffield,{'label':__('or :')})}}</p> 
     66     {%- else -%} 
     67          <td id='{{filter_id}}' colspan="2">{{ __('or :') }} </td><td>{{ form_field(f.ffield) }}</td> 
     68     {%- endif %} 
     69{% endblock %} 
     70 
     71 
     72{% block filter_richcombo %} 
    5273     <td id='{{filterd_id}}' title='{{f.desc}}' class="filter-title">{{f.desc}} : </td> 
    5374     <td>{{ form_field(f.fverb)}}</td> 
     
    5576{% endblock %} 
    5677 
    57 {% block filter_combo_cont %} 
    58      <td id='{{filter_id}}' colspan="2">{{ __('or :') }} </td><td>{{ form_field(f.ffield) }}</td> 
    59 {% endblock %} 
    6078 
    6179{% block filter_boolean %} 
     
    6482{% endblock %} 
    6583 
     84{% block filter_text %} 
     85     {% if f.display_inline is defined -%} 
     86          <p id='{{filter_id}}'>{{form_field(f.ffield,{},{'label':f.desc,'nestedlabel': true, 'labelclass':'classic' })}}</p> 
     87     {%- else -%} 
     88          <td id='{{filterd_id}}' title='{{f.desc}}' class="filter-title" colspan="2">{{f.desc}}</td> 
     89          <td>{{ form_field(f.ffield) }}</td> 
     90     {% endif %} 
     91{% endblock %} 
    6692 
    67 {% block entrieslist %} 
    68 {% if entries %} 
    69      <table class="maximal clear"> 
    70      <thead> 
    71           <tr> 
    72           {% for h in columns %} 
    7393 
    74           {% endfor %} 
    75           </tr> 
    76      </thead> 
    77  
    78 {% else %} 
    79      <p>{{ __('No entries') }}</p> 
    80 {% endif %} 
    81  
    82 {% endblock %} 
  • inc/admin/default-templates/posts.html.twig

    r1147 r1152  
    77     {{ js.modal }} 
    88     {{ js.meta_editor }} 
    9      <script type="text/javascript" src="{{theme_url}}js/_post.js"></script> 
     9     <script type="text/javascript" src="{{theme_url}}js/_posts_list.js"></script> 
     10     <script type="text/javascript" src="{{theme_url}}js/filters.js"></script> 
    1011     {{ js.confirm_close(['entry-form','comment-form']) }} 
    1112     {{ js.page_tabs(default_tab) }} 
     
    1819{% endblock %} 
    1920 
     21 
     22 
    2023{% block content %} 
    2124{{ parent() }} 
     
    2528<p> Applied filters : {{filters}} </p> 
    2629 
    27  
    28  
     30{{ listitems('lposts')}} 
    2931 
    3032{% endblock %} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map