-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend: com_contact view review #17217
Conversation
<label class="filter-search-lbl element-invisible" for="filter-search"> | ||
<span class="label label-warning"> | ||
<?php echo JText::_('JUNPUBLISHED'); ?> | ||
</span><?php echo JText::_('COM_CONTACT_FILTER_LABEL') . ' '; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt the php part be on new line, like line 39 below
<?php echo $item->event->afterDisplayTitle; ?> | ||
<?php echo $item->event->beforeDisplayContent; ?> | ||
<?php if ($this->params->get('show_position_headings')) : ?> | ||
<?php echo $item->con_position; ?><br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many tabs
<?php echo $item->con_position; ?><br /> | ||
<?php endif; ?> | ||
<?php if ($this->params->get('show_email_headings')) : ?> | ||
<?php echo $item->email_to; ?><br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many tabs
<?php echo JText::sprintf('COM_CONTACT_TELEPHONE_NUMBER', $item->telephone); ?><br /> | ||
<?php endif; ?> | ||
<?php if ($this->params->get('show_mobile_headings') && !empty ($item->mobile)) : ?> | ||
<?php echo JText::sprintf('COM_CONTACT_MOBILE_NUMBER', $item->mobile); ?><br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many tabs
</th> | ||
<?php endif; ?> | ||
<?php if ($this->params->get('show_suburb_headings')) : ?> | ||
<th class="item-suburb"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs extra tab
Thanks @brianteeman i have just fixed the comments. |
<?php if ($this->items[$i]->published == 0) : ?> | ||
<li class="row-fluid system-unpublished cat-list-row<?php echo $i % 2; ?>"> | ||
<?php else : ?> | ||
<li class="row-fluid cat-list-row<?php echo $i % 2; ?>" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space ?>" >
Fixed thanks @Quy |
<?php if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) : ?> | ||
<?php if (!isset($this->items[$this->parent->id][$id + 1])) : ?> | ||
<?php $class = ' class="last"'; ?> | ||
<?php endif; ?> | ||
<div <?php echo $class; ?> > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space before and after <?php echo $class; ?>
.
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?> | ||
<?php if (!isset($this->children[$this->category->id][$id + 1])) : ?> | ||
<?php $class = ' class="last"'; ?> | ||
<?php endif ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add ;
<dd> | ||
<span class="contact-webpage"> | ||
<a href="<?php echo $this->contact->webpage; ?>" target="_blank" rel="noopener noreferrer" itemprop="url"> | ||
<?php echo JStringPunycode::urlToUTF8($this->contact->webpage); ?></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent and move </a>
to the next line.
<h1><?php echo $this->escape($this->params->get('page_heading')); ?></h1> | ||
<?php endif; ?> | ||
<?php echo $this->loadTemplate('items'); ?> | ||
<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra space
<?php break; ?> | ||
<?php case 'profile_dob': ?> | ||
<?php echo '<dd>' . JHtml::_('date', $profile->text, JText::_('DATE_FORMAT_LC4'), false) . '</dd>'; ?> | ||
<?php break; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
I have not tested this item. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17217. |
I have tested this item ✅ successfully on 48824b1 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17217. |
<?php if (!isset($this->items[$this->parent->id][$id + 1])) : ?> | ||
<?php $class = ' class="last"'; ?> | ||
<?php endif; ?> | ||
<div<?php echo $class; ?>> | ||
<?php $class = ''; ?> | ||
<h3 class="page-header item-title"> | ||
<a href="<?php echo JRoute::_(ContactHelperRoute::getCategoryRoute($item->id, $item->language)); ?>"> | ||
<?php echo $this->escape($item->title); ?></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent and move </a>
to next line. Do the same for line 34.
@zero-24 can you please Update Instruction which Codestyle-Errors are meant so Tester know what to look for? |
<?php echo $this->pagination->getPagesLinks(); ?> | ||
</div> | ||
<?php endif; ?> | ||
<?php if ($this->params->get('show_page_heading') != 0 ) : ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space after 0
<?php endif; ?> | ||
<?php if ($this->params->get('show_country_headings')) : ?> | ||
<td class="item-state" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"> | ||
<span itemprop="addressCountry"><?php echo $item->country; ?></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split into multiple lines? If yes, do the same in the above lines?
@franz-wohlkoenig please explain what you want from me? I'm a bit lost with your comment? :( |
</h2> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php $show_contact_category = $tparams->get('show_contact_category'); ?> | ||
|
||
<?php if ($show_contact_category === 'show_no_link') : ?> | ||
<h3> | ||
<span class="contact-category"><?php echo $this->contact->category_title; ?></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple lines. Same for lines 49-50.
<?php echo $this->loadTemplate('address'); ?> | ||
|
||
<?php if ($tparams->get('allow_vcard')) : ?> | ||
<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS'); ?> | ||
<a href="<?php echo JRoute::_('index.php?option=com_contact&view=contact&id=' . $this->contact->id . '&format=vcf'); ?>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? This line looks good to me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 105: Indent and move </a>
to the next line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -8,37 +8,34 @@ | |||
*/ | |||
|
|||
defined('_JEXEC') or die; | |||
|
|||
?> | |||
<?php if (JPluginHelper::isEnabled('user', 'profile')) : | |||
$fields = $this->item->profile->getFieldset('profile'); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding style
<?php echo '<dt>' . $profile->label . '</dt>'; ?> | ||
<?php $profile->text = htmlspecialchars($profile->value, ENT_COMPAT, 'UTF-8'); ?> | ||
<?php switch ($profile->id) : | ||
case 'profile_website': ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first switch case can not be written different sadly :(
I have tested this item ✅ successfully on 2efc080 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17217. |
Same here I'm closing this as it is conflicting and this is going to be moved against 4.0-dev in a later PR. Thanks @Quy , @franz-wohlkoenig , @Heggi93 & @brianteeman your comments they are not going to be missing. I'm going to implement as much as possible directly in the new PR. Thanks for all the work on the reviews 👍 ❤️ |
Summary of Changes
Review frontend com_contact views
Testing Instructions
Install sample testing data and navigate all the com_contact frontend views.
Expected result
All still works
Actual result
The views have cs errors ;)
Documentation Changes Required
None