mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/12265] Remove ugly logic.
PHPBB3-12265
This commit is contained in:
parent
eae37267a5
commit
df8832455d
3 changed files with 12 additions and 47 deletions
|
@ -35,18 +35,6 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- IF U_PM or U_EMAIL or U_JABBER -->
|
<!-- IF U_PM or U_EMAIL or U_JABBER -->
|
||||||
{% set CELL_BREAK = {1: 1, 2: 1, 3: 2, 4: 2, 5: 3, 6: 3, 7: 4, 8: 4, 9: 5, 10: 5, 11: 4, 12: 4, 13: 5, 14: 5, 16: 4} %}
|
|
||||||
{% set CONTACT_CNT = 0 %}
|
|
||||||
{% set CNT = 0 %}
|
|
||||||
<!-- IF U_PM -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
<!-- IF U_EMAIL -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
<!-- IF U_JABBER -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
|
|
||||||
<!-- BEGIN custom_fields -->
|
|
||||||
<!-- IF custom_fields.S_PROFILE_CONTACT -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
<!-- END custom_fields -->
|
|
||||||
<!-- IF CELL_BREAK[CONTACT_CNT] -->{% set DIV_CNT = CELL_BREAK[CONTACT_CNT] %}<!-- ELSE -->{% set DIV_CNT = 4 %}<!-- ENDIF -->
|
|
||||||
|
|
||||||
<dd class="profile-contact">
|
<dd class="profile-contact">
|
||||||
<strong>{L_CONTACT_USER}{L_COLON}</strong>
|
<strong>{L_CONTACT_USER}{L_COLON}</strong>
|
||||||
<div class="dropdown-container">
|
<div class="dropdown-container">
|
||||||
|
@ -54,35 +42,27 @@
|
||||||
<div class="dropdown hidden">
|
<div class="dropdown hidden">
|
||||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||||
<div class="dropdown-contents contact-icons">
|
<div class="dropdown-contents contact-icons">
|
||||||
<div>
|
|
||||||
<!-- EVENT ucp_pm_viewmessage_contact_fields_before -->
|
<!-- EVENT ucp_pm_viewmessage_contact_fields_before -->
|
||||||
<!-- IF U_PM -->
|
<!-- IF U_PM -->
|
||||||
{% set CNT = CNT + 1 %}
|
|
||||||
<a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span class="contact-icon pm-icon"></span></a>
|
<a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span class="contact-icon pm-icon"></span></a>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF U_EMAIL -->
|
<!-- IF U_EMAIL -->
|
||||||
{% set CNT = CNT + 1 %}
|
|
||||||
<a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {POST_AUTHOR}"><span class="contact-icon email-icon"></span></a>
|
<a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {POST_AUTHOR}"><span class="contact-icon email-icon"></span></a>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF U_JABBER -->
|
<!-- IF U_JABBER -->
|
||||||
{% set CNT = CNT + 1 %}
|
<a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span class="contact-icon jabber-icon"></span></a>
|
||||||
<a <!-- IF CNT % DIV_CNT == 0 -->class="last-cell" <!-- ENDIF -->href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span class="contact-icon jabber-icon"></span></a>
|
|
||||||
<!-- IF (CNT % DIV_CNT == 0) && CNT != CONTACT_CNT --></div><div><!-- ENDIF -->
|
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- BEGIN custom_fields -->
|
<!-- BEGIN custom_fields -->
|
||||||
<!-- IF custom_fields.S_PROFILE_CONTACT -->
|
<!-- IF custom_fields.S_PROFILE_CONTACT -->
|
||||||
{% set CNT = CNT + 1 %}
|
<a href="<!-- IF postrow.custom_fields.PROFILE_FIELD_CONTACT -->{custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{U_POST_AUTHOR}<!-- ENDIF -->" title="{custom_fields.PROFILE_FIELD_NAME}">
|
||||||
<a <!-- IF CNT % DIV_CNT == 0 -->class="last-cell" <!-- ENDIF -->href="<!-- IF postrow.custom_fields.PROFILE_FIELD_CONTACT -->{custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{U_POST_AUTHOR}<!-- ENDIF -->" title="{custom_fields.PROFILE_FIELD_NAME}">
|
|
||||||
<span class="contact-icon {custom_fields.PROFILE_FIELD_IDENT}-icon"></span>
|
<span class="contact-icon {custom_fields.PROFILE_FIELD_IDENT}-icon"></span>
|
||||||
</a>
|
</a>
|
||||||
<!-- IF (CNT % DIV_CNT == 0) && CNT != CONTACT_CNT --></div><div><!-- ENDIF -->
|
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- END custom_fields -->
|
<!-- END custom_fields -->
|
||||||
<!-- EVENT ucp_pm_viewmessage_contact_fields_after -->
|
<!-- EVENT ucp_pm_viewmessage_contact_fields_after -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -144,17 +144,6 @@
|
||||||
<!-- EVENT viewtopic_body_postrow_custom_fields_after -->
|
<!-- EVENT viewtopic_body_postrow_custom_fields_after -->
|
||||||
|
|
||||||
<!-- IF not S_IS_BOT and (postrow.U_PM or postrow.U_EMAIL or postrow.U_JABBER) -->
|
<!-- IF not S_IS_BOT and (postrow.U_PM or postrow.U_EMAIL or postrow.U_JABBER) -->
|
||||||
{% set CELL_BREAK = {1: 1, 2: 1, 3: 2, 4: 2, 5: 3, 6: 3, 7: 4, 8: 4, 9: 5, 10: 5, 11: 4, 12: 4, 13: 5, 14: 5, 16: 4} %}
|
|
||||||
{% set CONTACT_CNT = 0 %}
|
|
||||||
{% set CNT = 0 %}
|
|
||||||
<!-- IF postrow.U_PM -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
<!-- IF postrow.U_EMAIL -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
<!-- IF postrow.U_JABBER -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
<!-- BEGIN custom_fields -->
|
|
||||||
<!-- IF postrow.custom_fields.S_PROFILE_CONTACT -->{% set CONTACT_CNT = CONTACT_CNT + 1 %}<!-- ENDIF -->
|
|
||||||
<!-- END custom_fields -->
|
|
||||||
<!-- IF CELL_BREAK[CONTACT_CNT] -->{% set DIV_CNT = CELL_BREAK[CONTACT_CNT] %}<!-- ELSE -->{% set DIV_CNT = 4 %}<!-- ENDIF -->
|
|
||||||
|
|
||||||
<dd class="profile-contact">
|
<dd class="profile-contact">
|
||||||
<strong>{L_CONTACT_USER}{L_COLON}</strong>
|
<strong>{L_CONTACT_USER}{L_COLON}</strong>
|
||||||
<div class="dropdown-container">
|
<div class="dropdown-container">
|
||||||
|
@ -162,33 +151,25 @@
|
||||||
<div class="dropdown hidden">
|
<div class="dropdown hidden">
|
||||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||||
<div class="dropdown-contents contact-icons">
|
<div class="dropdown-contents contact-icons">
|
||||||
<div>
|
|
||||||
<!-- IF postrow.U_PM -->
|
<!-- IF postrow.U_PM -->
|
||||||
{% set CNT = CNT + 1 %}
|
|
||||||
<a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span class="contact-icon pm-icon"></span></a>
|
<a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span class="contact-icon pm-icon"></span></a>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF postrow.U_EMAIL -->
|
<!-- IF postrow.U_EMAIL -->
|
||||||
{% set CNT = CNT + 1 %}
|
|
||||||
<a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span class="contact-icon email-icon"></span></a>
|
<a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span class="contact-icon email-icon"></span></a>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF postrow.U_JABBER -->
|
<!-- IF postrow.U_JABBER -->
|
||||||
{% set CNT = CNT + 1 %}
|
<a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span class="contact-icon jabber-icon"></span></a>
|
||||||
<a <!-- IF CNT % DIV_CNT == 0 -->class="last-cell" <!-- ENDIF -->href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span class="contact-icon jabber-icon"></span></a>
|
|
||||||
<!-- IF (CNT % DIV_CNT == 0) && CNT != CONTACT_CNT --></div><div><!-- ENDIF -->
|
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- BEGIN custom_fields -->
|
<!-- BEGIN custom_fields -->
|
||||||
<!-- IF postrow.custom_fields.S_PROFILE_CONTACT -->
|
<!-- IF postrow.custom_fields.S_PROFILE_CONTACT -->
|
||||||
{% set CNT = CNT + 1 %}
|
<a href="<!-- IF postrow.custom_fields.PROFILE_FIELD_CONTACT -->{postrow.custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->" title="{postrow.custom_fields.PROFILE_FIELD_NAME}">
|
||||||
<a <!-- IF CNT % DIV_CNT == 0 -->class="last-cell" <!-- ENDIF -->href="<!-- IF postrow.custom_fields.PROFILE_FIELD_CONTACT -->{postrow.custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->" title="{postrow.custom_fields.PROFILE_FIELD_NAME}">
|
|
||||||
<span class="contact-icon {postrow.custom_fields.PROFILE_FIELD_IDENT}-icon"></span>
|
<span class="contact-icon {postrow.custom_fields.PROFILE_FIELD_IDENT}-icon"></span>
|
||||||
</a>
|
</a>
|
||||||
<!-- IF (CNT % DIV_CNT == 0) && CNT != CONTACT_CNT --></div><div><!-- ENDIF -->
|
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- END custom_fields -->
|
<!-- END custom_fields -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</dd>
|
</dd>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
|
|
@ -254,12 +254,16 @@ ul.profile-icons.responsive a.responsive-menu-link:before {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact-icons div:last-child a {
|
.contact-icons a:nth-child(4) {
|
||||||
border-bottom: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact-icons .last-cell {
|
.contact-icons a:nth-child(5) {
|
||||||
border-right: none;
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-icons div:last-child a {
|
||||||
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue