Changed file actions display
authorThierry Florac <thierry.florac@onf.fr>
Wed, 12 Jul 2017 12:07:41 +0200
changeset 44 6ccd68cd7379
parent 43 1a33309aef31
child 45 62088c049884
Changed file actions display
src/pyams_file/widget/templates/file-input.pt
src/pyams_file/widget/templates/image-input.pt
--- a/src/pyams_file/widget/templates/file-input.pt	Wed Jul 12 12:06:48 2017 +0200
+++ b/src/pyams_file/widget/templates/file-input.pt	Wed Jul 12 12:07:41 2017 +0200
@@ -28,21 +28,15 @@
 			<div class="btn-group dropup"
 				 tal:define="actions extension:context_actions(value)"
 				 tal:omit-tag="not:actions">
-				<a class="btn btn-xs btn-default" target="download_window"
+				<tal:loop repeat="viewlet actions/viewlets"
+						  content="structure viewlet/render">
+				</tal:loop>
+				<a class="btn btn-xs btn-primary" target="download_window"
 				   tal:define="href extension:absolute_url(value)"
 				   tal:attributes="href string:${href}?download=1"
 				   i18n:translate="">
 					Download
 				</a>
-				<tal:if condition="actions">
-					<button class="btn btn-xs btn-primary dropdown-toggle" data-toggle="dropdown">
-						<i class="fa fa-caret-up"></i>
-					</button>
-					<ul class="dropdown-menu">
-						<tal:loop repeat="viewlet actions/viewlets"
-								  content="structure viewlet/render" />
-					</ul>
-				</tal:if>
 			</div>
 		</div>
 	</div>
--- a/src/pyams_file/widget/templates/image-input.pt	Wed Jul 12 12:06:48 2017 +0200
+++ b/src/pyams_file/widget/templates/image-input.pt	Wed Jul 12 12:07:41 2017 +0200
@@ -41,21 +41,15 @@
 			<div class="btn-group dropup"
 				 tal:define="actions extension:context_actions(value)"
 				 tal:omit-tag="not:actions">
-				<a class="btn btn-xs btn-default" target="download_window"
+				<tal:loop repeat="viewlet actions/viewlets"
+						  content="structure viewlet/render">
+				</tal:loop>
+				<a class="btn btn-xs btn-primary" target="download_window"
 				   tal:define="href extension:absolute_url(value)"
 				   tal:attributes="href string:${href}?download=1"
 				   i18n:translate="">
 					Download
 				</a>
-				<tal:if condition="actions">
-					<button class="btn btn-xs btn-primary dropdown-toggle" data-toggle="dropdown">
-						<i class="fa fa-caret-up"></i>
-					</button>
-					<ul class="dropdown-menu">
-						<tal:loop repeat="viewlet actions/viewlets"
-								  content="structure viewlet/render" />
-					</ul>
-				</tal:if>
 			</div>
 		</div>
 	</div>