Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jul 2, 2023
1 parent 2da55b4 commit 7e9b09d
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions plugin/PlayLists/managerPlaylists.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
$maxItemsInPlaylist = 10;
require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isLogged()) {
gotToLoginAndComeBackHere('');
Expand Down Expand Up @@ -162,7 +163,7 @@ function getPlaylistOwnerUsersId()
<button type="button" class="btn btn-default btn-xs pull-right" data-toggle="tooltip" title="<?php echo __('Play'); ?>" onclick="avideoModalIframe('<?php echo PlayLists::getLink($value["id"], true); ?>');">
<i class="fas fa-play"></i>
</button>
<button type="button" class="btn btn-default btn-xs editBtn " onclick="editPlayList(<?php echo $value["id"]; ?>);" data-toggle="tooltip" title="<?php echo __('Edit'); ?>">
<button type="button" class="btn btn-default btn-xs editBtn " onclick="editPlayList(<?php echo $value['id']; ?>);" data-toggle="tooltip" title="<?php echo __('Edit'); ?>">
<i class="fas fa-edit"></i>
</button>
</div>
Expand Down Expand Up @@ -213,9 +214,21 @@ function getPlaylistOwnerUsersId()
<ul class="list-group">
<?php
if ($totalSubPlaylists > 0) {
$countItemsInPlaylist = 0;
foreach ($rowsSubPlaylists as $row) {
$durationInSeconds += durationToSeconds($row["duration"]);
$countItemsInPlaylist++;
if ($countItemsInPlaylist > $maxItemsInPlaylist) {
?>
<li class="list-group-item">
<button type="button" class="btn btn-default btn-xs editBtn " onclick="editPlayList(<?php echo $value['id']; ?>);" data-toggle="tooltip" title="<?php echo __('Edit'); ?>">
<i class="fas fa-edit"></i>
</button>
</li>
<?php
break;
}
$durationInSeconds += durationToSeconds($row["duration"]);
?>
<li class="list-group-item" id="videos_id_<?php echo $row["id"]; ?>_playlists_id_<?php echo $value["id"]; ?>">
<div class="ellipsis videoTitle">
<?php
Expand Down Expand Up @@ -246,10 +259,22 @@ function getPlaylistOwnerUsersId()
<div id="videos<?php echo $value["id"]; ?>" class="tab-pane fade <?php echo $active; ?>">
<ul class="list-group">
<?php
$countItemsInPlaylist = 0;
foreach ($rowsNOTSubPlaylists as $row) {
$countItemsInPlaylist++;
if ($countItemsInPlaylist > $maxItemsInPlaylist) {
?>
<li class="list-group-item">
<button type="button" class="btn btn-default btn-xs editBtn " onclick="editPlayList(<?php echo $value['id']; ?>);" data-toggle="tooltip" title="<?php echo __('Edit'); ?>">
<i class="fas fa-edit"></i>
</button>
</li>
<?php
break;
}
if ($totalNOTSubPlaylists > 0) {
$durationInSeconds += durationToSeconds($row["duration"]);
?>
?>
<li class="list-group-item" id="videos_id_<?php echo $row["id"]; ?>_playlists_id_<?php echo $value["id"]; ?>">
<div class="ellipsis videoTitle">
<?php
Expand Down

0 comments on commit 7e9b09d

Please sign in to comment.