From e6b448f298e12b48faf3141483fffbc6d81c8732 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 10 Feb 2015 20:10:03 -0600 Subject: [PATCH] More versioning support fixes, to allow on or off. --- tailbone/templates/categories/crud.mako | 2 +- tailbone/templates/labels/profiles/read.mako | 2 +- tailbone/templates/roles/crud.mako | 2 +- tailbone/templates/users/crud.mako | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tailbone/templates/categories/crud.mako b/tailbone/templates/categories/crud.mako index b1ce53e7..4aace32a 100644 --- a/tailbone/templates/categories/crud.mako +++ b/tailbone/templates/categories/crud.mako @@ -8,7 +8,7 @@ % elif form.updating:
  • ${h.link_to("View this Category", url('category.read', uuid=form.fieldset.model.uuid))}
  • % endif - % if not form.creating and request.has_perm('category.versions.view'): + % if version_count is not Undefined and request.has_perm('category.versions.view'):
  • ${h.link_to("View Change History ({0})".format(version_count), url('category.versions', uuid=form.fieldset.model.uuid))}
  • % endif diff --git a/tailbone/templates/labels/profiles/read.mako b/tailbone/templates/labels/profiles/read.mako index 8af13c45..c48a21b6 100644 --- a/tailbone/templates/labels/profiles/read.mako +++ b/tailbone/templates/labels/profiles/read.mako @@ -11,7 +11,7 @@
  • ${h.link_to("Edit Printer Settings", url('label_profile.printer_settings', uuid=profile.uuid))}
  • % endif % endif - % if not form.creating and request.has_perm('labelprofile.versions.view'): + % if version_count is not Undefined and request.has_perm('labelprofile.versions.view'):
  • ${h.link_to("View Change History ({0})".format(version_count), url('labelprofile.versions', uuid=form.fieldset.model.uuid))}
  • % endif diff --git a/tailbone/templates/roles/crud.mako b/tailbone/templates/roles/crud.mako index 0965e937..38e66f7a 100644 --- a/tailbone/templates/roles/crud.mako +++ b/tailbone/templates/roles/crud.mako @@ -14,7 +14,7 @@
  • ${h.link_to("View this Role", url('role.read', uuid=form.fieldset.model.uuid))}
  • % endif
  • ${h.link_to("Delete this Role", url('role.delete', uuid=form.fieldset.model.uuid), class_='delete')}
  • - % if not form.creating and request.has_perm('role.versions.view'): + % if version_count is not Undefined and request.has_perm('role.versions.view'):
  • ${h.link_to("View Change History ({0})".format(version_count), url('role.versions', uuid=form.fieldset.model.uuid))}
  • % endif diff --git a/tailbone/templates/users/crud.mako b/tailbone/templates/users/crud.mako index e18c1b27..b46ca1ed 100644 --- a/tailbone/templates/users/crud.mako +++ b/tailbone/templates/users/crud.mako @@ -8,7 +8,7 @@ % elif form.updating:
  • ${h.link_to("View this User", url('user.read', uuid=form.fieldset.model.uuid))}
  • % endif - % if not form.creating and request.has_perm('user.versions.view'): + % if version_count is not Undefined and request.has_perm('user.versions.view'):
  • ${h.link_to("View Change History ({0})".format(version_count), url('user.versions', uuid=form.fieldset.model.uuid))}
  • % endif