|
43 | 43 | </tal:fields> |
44 | 44 | </div> |
45 | 45 |
|
46 | | - |
47 | | - <div class="collection-item" tal:repeat="item results"> |
| 46 | + <div tal:condition="not:view/is_slidemode" |
| 47 | + class="collection-item" tal:repeat="item results"> |
48 | 48 | <tal:items define="obj item/getObject"> |
49 | 49 | <tal:fields repeat="field view/configured_fields"> |
50 | 50 | <tal:image define="thumbnail python:view.thumbnail(obj);" |
|
100 | 100 | </tal:items> |
101 | 101 | <div class="visualClear"><!-- --></div> |
102 | 102 | </div> |
| 103 | + |
| 104 | + <div tal:condition="view/is_slidemode"> |
| 105 | + <div tal:attributes="id string:carousel-${view/data/uuid}" |
| 106 | + class="carousel slide" data-ride="carousel"> |
| 107 | + <!-- Indicators --> |
| 108 | + <ol class="carousel-indicators"> |
| 109 | + <li tal:repeat="index python:range(0, len(results))" |
| 110 | + tal:attributes="data-target string:#carousel-${view/data/uuid}; |
| 111 | + data-slide-to index; |
| 112 | + class python:index==0 and 'active' or ''"></li> |
| 113 | + </ol> |
| 114 | + |
| 115 | + <!-- Wrapper for slides --> |
| 116 | + <div class="carousel-inner" role="listbox"> |
| 117 | + <tal:loop tal:repeat="item results"> |
| 118 | + <div tal:define="index repeat/item/index" |
| 119 | + tal:attributes="class python:index==0 and 'item active' or 'item'"> |
| 120 | + <tal:items define="obj item/getObject"> |
| 121 | + <tal:fields repeat="field view/configured_fields"> |
| 122 | + <tal:image define="thumbnail python:view.thumbnail(obj);" |
| 123 | + condition="python:field['id'] == 'image' and thumbnail"> |
| 124 | + <a tal:attributes="href obj/absolute_url"> |
| 125 | + <img tal:attributes="src thumbnail/url; |
| 126 | + width thumbnail/width; |
| 127 | + height thumbnail/height; |
| 128 | + class view/get_image_position; |
| 129 | + alt obj/Title;" /> |
| 130 | + </a> |
| 131 | + </tal:image> |
| 132 | + |
| 133 | + <tal:title define="htmltag python:field.get('htmltag', 'h1')" |
| 134 | + condition="python:field['id'] == 'title'"> |
| 135 | + |
| 136 | + <h1 tal:condition="python:htmltag == 'h1'"> |
| 137 | + <a tal:attributes="href obj/absolute_url" |
| 138 | + tal:content="obj/Title" /> |
| 139 | + </h1> |
| 140 | + |
| 141 | + <h2 tal:condition="python:htmltag == 'h2'"> |
| 142 | + <a tal:attributes="href obj/absolute_url" |
| 143 | + tal:content="obj/Title" /> |
| 144 | + </h2> |
| 145 | + |
| 146 | + <h3 tal:condition="python:htmltag == 'h3'"> |
| 147 | + <a tal:attributes="href obj/absolute_url" |
| 148 | + tal:content="obj/Title" /> |
| 149 | + </h3> |
| 150 | + |
| 151 | + <h4 tal:condition="python:htmltag == 'h4'"> |
| 152 | + <a tal:attributes="href obj/absolute_url" |
| 153 | + tal:content="obj/Title" /> |
| 154 | + </h4> |
| 155 | + |
| 156 | + </tal:title> |
| 157 | + |
| 158 | + <p class="description" |
| 159 | + tal:condition="python:field['id'] == 'description'" |
| 160 | + tal:content="obj/Description" /> |
| 161 | + |
| 162 | + <p tal:condition="python:field['id'] == 'date'" |
| 163 | + tal:content="python:toLocalizedTime(view.Date(item), True)" /> |
| 164 | + </tal:fields> |
| 165 | + </tal:items> |
| 166 | + </div> |
| 167 | + </tal:loop> |
| 168 | + </div> |
| 169 | + |
| 170 | + <!-- Controls --> |
| 171 | + <a tal:attributes="href string:#carousel-${view/data/uuid}" |
| 172 | + class="left carousel-control" role="button" data-slide="prev"> |
| 173 | + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
| 174 | + <span class="sr-only">Previous</span> |
| 175 | + </a> |
| 176 | + <a tal:attributes="href string:#carousel-${view/data/uuid}" |
| 177 | + class="right carousel-control" role="button" data-slide="next"> |
| 178 | + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> |
| 179 | + <span class="sr-only">Next</span> |
| 180 | + </a> |
| 181 | + </div> |
| 182 | + </div> |
| 183 | + |
103 | 184 | <div class="tile-footer" tal:condition="view/show_footer"> |
104 | 185 | <a tal:attributes="href view/collection_url" tal:content="view/data/footer" /> |
105 | 186 | </div> |
|
0 commit comments