diff --git a/RIGS/templates/partials/event_details.html b/RIGS/templates/partials/event_details.html index 457520d3..0d7c6547 100644 --- a/RIGS/templates/partials/event_details.html +++ b/RIGS/templates/partials/event_details.html @@ -20,15 +20,7 @@ {% if event.is_rig %}
Event MIC
-
- {% if event.mic and perms.RIGS.view_profile %} - - {{ event.mic.name }} - - {% else %} - {{ event.mic.name }} - {% endif %} -
+
{% include 'partials/linked_name.html' with profile=event.mic %}
{% endif %}
Status
@@ -71,7 +63,7 @@ {% if event.dry_hire %}
Checked In By
-
{{ object.checked_in_by.name }}
+
{% include 'partials/linked_name.html' with profile=event.checked_in_by %}
{% endif %} {% if event.is_rig %} diff --git a/RIGS/templates/partials/linked_name.html b/RIGS/templates/partials/linked_name.html new file mode 100644 index 00000000..49b2158e --- /dev/null +++ b/RIGS/templates/partials/linked_name.html @@ -0,0 +1,7 @@ +{% if profile and perms.RIGS.view_profile %} + + {{ profile.name }} + +{% else %} + {{ profile.name }} +{% endif %} diff --git a/versioning/templates/partials/activity_table_body.html b/versioning/templates/partials/activity_table_body.html index 85d93383..4f95d787 100644 --- a/versioning/templates/partials/activity_table_body.html +++ b/versioning/templates/partials/activity_table_body.html @@ -16,7 +16,7 @@ {{ version.revision.date_created }} {{ version.changes.new.display_id|default:version.changes.new.pk }} | {{version.changes.new|to_class_name}} {{ version.pk }}|{{ version.revision.pk }} - {{ version.revision.user.name|default:"System" }} + {% include 'partials/linked_name.html' with profile=version.revision.user %} {% if version.changes.old == None %} Created {{version.changes.new|to_class_name}}