Changed admin view name to "admin" instead of "admin.html"
authorThierry Florac <thierry.florac@onf.fr>
Tue, 11 Oct 2016 17:08:11 +0200
changeset 24 6fd8d188d2da
parent 23 ab9757f55f08
child 25 8a67d57d53c6
Changed admin view name to "admin" instead of "admin.html"
src/pyams_workflow/zmi/viewlet/templates/versions.pt
src/pyams_workflow/zmi/workflow.py
--- a/src/pyams_workflow/zmi/viewlet/templates/versions.pt	Wed Jun 15 14:47:22 2016 +0200
+++ b/src/pyams_workflow/zmi/viewlet/templates/versions.pt	Tue Oct 11 17:08:11 2016 +0200
@@ -13,7 +13,7 @@
 			tal:repeat="version view.workflow_versions">
 			<a tal:define="url extension:absolute_url(version);
 						   state view.get_workflow_state(version);"
-			   tal:attributes="data-ams-url string:${url}/admin.html#${request.view_name}">
+			   tal:attributes="data-ams-url string:${url}/admin#${request.view_name}">
 				<i class="fa fa-fw"
 				   tal:attributes="class 'fa fa-fw fa-arrow-right {0}'.format('txt-color-white' if current_state['version'] != state['version'] else '')"></i>
 				<tal:var i18n:translate="">
--- a/src/pyams_workflow/zmi/workflow.py	Wed Jun 15 14:47:22 2016 +0200
+++ b/src/pyams_workflow/zmi/workflow.py	Tue Oct 11 17:08:11 2016 +0200
@@ -101,7 +101,7 @@
             for version in wf_versions[:3]:
                 state = IWorkflowState(version)
                 result += '<li><a data-ams-url="{url}">{version}</a></li>'.format(
-                    url=absolute_url(version, self.request, 'admin.html'),
+                    url=absolute_url(version, self.request, 'admin'),
                     version=translate(_("Version {version} ({state} - last update {date})")).format(
                         version=state.version_id,
                         state=translate(workflow.states.getTerm(state.state).title),
@@ -129,7 +129,7 @@
     for version in IWorkflowVersions(element).get_last_versions(count=0)[ignore:]:
         state = IWorkflowState(version)
         result += '<li><a data-ams-url="{url}">{version}</a></li>'.format(
-            url=absolute_url(version, request, 'admin.html'),
+            url=absolute_url(version, request, 'admin'),
             version=translate(_("Version {version} ({state} - last update {date})")).format(
                 version=state.version_id,
                 state=translate(workflow.states.getTerm(state.state).title),