Skip to content
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

Fix button modal #512

Open
wants to merge 2 commits into
base: 4.0-dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions src/components/com_weblinks/tmpl/category/default_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,7 @@
<?php else : ?>
<ul class="category list-unstyled">
<?php foreach ($this->items as $i => $item) : ?>
<?php
// Shouldn't this be only for users with admin rights?
// @ToDo: what is the difference -class system-unbublished?
if ($item->state == 0) : ?>
<li class="system-unpublished list-group mt-3">
<?php else : ?>
<li class="list-group mt-3">
<?php endif; ?>
<li class="list-group mt-3">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should leave the class system-unpublished as how it is. It gives a way to allow target unpublished weblink items (note that on this page, we also display unpublished items for users with core.edit or core.edit.state permission) via css if needed. For your information, we also have that css class for other core components like com_contact https://github.com/joomla/joomla-cms/blob/4.2-dev/components/com_contact/tmpl/category/default_items.php#L96 .


<?php if ($canEdit || ($canEditOwn && $item->created_by == $userId)) : ?>
<div class="icons list-group-item">
Expand Down Expand Up @@ -127,9 +120,8 @@
$modalParams['bodyHeight'] = 70;
$modalParams['modalWidth'] = 80;
echo HTMLHelper::_('bootstrap.renderModal', $modalId, $modalParams);
echo '<button type="button" class="btn btn-link" data-bs-toggle="modal" data-bs-target="#' . $modalId . '">
' . $item->title . '
</button>';
echo '<a role="button" class="' . $menuclass . '" data-bs-toggle="modal" data-bs-target="#' . $modalId . '">' .
$this->escape($item->title) . ' </a>';
break;
default:
// Open in parent window
Expand Down