Skip to content

Commit

Permalink
Improve content type icons name calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
laulaz committed Oct 29, 2024
1 parent b928aa7 commit 0b01365
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<h1 class="heldpos">
<tal:icon
tal:define="icon_name context/getIconURL"
tal:define="icon_name string:contenttype/${context/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<span tal:content="view/title" />
</h1>
Expand All @@ -24,7 +24,7 @@
<div class="field" tal:condition="view/position">
<label><tal:block i18n:translate="">Position</tal:block>:</label>
<tal:icon
tal:define="icon_name view/position/getIconURL"
tal:define="icon_name string:contenttype/${view/position/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a class="link-tooltip" tal:attributes="href view/position/absolute_url">
<span tal:content="view/position/Title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<h1 class="org">
<tal:icon
tal:define="icon_name context/getIconURL"
tal:define="icon_name string:contenttype/${context/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<span tal:content="view/name" />
</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<h1 class="fn">
<tal:icon
tal:define="icon_name context/getIconURL"
tal:define="icon_name string:contenttype/${context/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<span tal:content="view/name" />
</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<h1 class="pos">
<tal:icon
tal:define="icon_name context/getIconURL"
tal:define="icon_name string:contenttype/${context/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<span tal:content="view/name" />
</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/collective/contact/core/browser/templates/contact.pt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<tal:block tal:repeat="organization view/organizations">
<li>
<tal:icon
tal:define="icon_name organization/getIconURL"
tal:define="icon_name string:contenttype/${organization/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a class="link-tooltip" tal:attributes="href organization/absolute_url">
<span tal:replace="organization/Title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</div>
<h4>
<tal:icon
tal:define="icon_name organization/getIconURL"
tal:define="icon_name string:contenttype/${organization/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a tal:attributes="href organization/absolute_url" tal:content="organization/get_full_title"></a>
</h4>
Expand Down
6 changes: 3 additions & 3 deletions src/collective/contact/core/browser/templates/organization.pt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tal:block tal:repeat="organization view/parent_organizations">
<li>
<tal:icon
tal:define="icon_name organization/getIconURL"
tal:define="icon_name string:contenttype/${organization/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a class="link-tooltip" tal:attributes="href organization/absolute_url">
<span tal:replace="organization/Title"
Expand All @@ -43,7 +43,7 @@
<tal:block tal:repeat="position view/positions">
<li tal:define="held_positions position/get_held_positions|nothing">
<tal:icon
tal:define="icon_name position/getIconURL"
tal:define="icon_name string:contenttype/${position/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a class="link-tooltip" tal:attributes="href position/absolute_url">
<span tal:replace="position/Title"
Expand All @@ -52,7 +52,7 @@
<ul tal:repeat="held_position held_positions">
<li tal:define="person held_position/get_person">
<tal:icon
tal:define="icon_name person/getIconURL"
tal:define="icon_name string:contenttype/${person/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a class="link-tooltip"
tal:attributes="href person/absolute_url">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
height="64" />
</span>
<img tal:condition="not:contact/display_photo"
tal:define="icon_name contact/person/getIconURL"
tal:define="icon_name string:contenttype/${contact/person/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />

<span class="contact-title" tal:content="title"></span>
</a>

<a tal:attributes="href contact/obj/absolute_url;">
<img tal:define="icon_name contact/obj/getIconURL"
<img tal:define="icon_name string:contenttype/${contact/obj/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<span id="contact-held-position" tal:condition="contact/held_position" tal:content="contact/held_position" />
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/collective/contact/core/browser/templates/position.pt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<tal:block tal:repeat="organization view/organizations">
<li>
<tal:icon
tal:define="icon_name organization/getIconURL"
tal:define="icon_name string:contenttype/${organization/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a class="link-tooltip" tal:attributes="href organization/absolute_url">
<span tal:replace="organization/Title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<tal:block tal:repeat="sub_org view/sub_organizations">
<li>
<tal:icon
tal:define="icon_name context/getIconURL"
tal:define="icon_name string:contenttype/${context/portal_type}"
tal:replace="structure python:icons.tag(icon_name)" />
<a class="link-tooltip" tal:attributes="href sub_org/getURL">
<span tal:replace="sub_org/Title"
Expand Down

0 comments on commit 0b01365

Please sign in to comment.