mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Bootstrap5 markup added to download item pagination. Fallback added to e107.css
This commit is contained in:
@@ -1053,15 +1053,16 @@ class download_shortcodes extends e_shortcode
|
||||
$tp = e107::getParser();
|
||||
|
||||
$dlrow_id = intval($this->var['download_id']);
|
||||
|
||||
|
||||
$icon = (deftrue('BOOTSTRAP')) ? $tp->toGlyph('fa-chevron-left') : '<<';
|
||||
$class = empty($parm['class']) ? 'e-tip page-link' : $parm['class'];
|
||||
|
||||
if ($sql->select("download", "*", "download_category='".intval($this->var['download_category_id'])."' AND download_id < {$dlrow_id} AND download_active > 0 && download_visible IN (".USERCLASS_LIST.") ORDER BY download_datestamp DESC LIMIT 1"))
|
||||
{
|
||||
$dlrowrow = $sql->fetch();
|
||||
|
||||
$url = e107::url('download', 'item', $dlrowrow);
|
||||
|
||||
$icon = (deftrue('BOOTSTRAP')) ? $tp->toGlyph('fa-chevron-left') : '<<';
|
||||
$class = empty($parm['class']) ? 'e-tip' : $parm['class'];
|
||||
|
||||
return "<a class='".$class."' href='".$url ."' title=\"".$dlrowrow['download_name']."\">".$icon." ".LAN_PREVIOUS."</a>\n";
|
||||
|
||||
@@ -1069,7 +1070,8 @@ class download_shortcodes extends e_shortcode
|
||||
}
|
||||
else
|
||||
{
|
||||
return " ";
|
||||
$class .= ' disabled';
|
||||
return "<a class='".$class."' href='#' >".$icon." ".LAN_PREVIOUS."</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1081,15 +1083,17 @@ class download_shortcodes extends e_shortcode
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
$dlrow_id = intval($this->var['download_id']);
|
||||
|
||||
$icon = (deftrue('BOOTSTRAP')) ? $tp->toGlyph('fa-chevron-right') : '>>';
|
||||
$class = empty($parm['class']) ? 'e-tip page-link' : $parm['class'];
|
||||
|
||||
if ($sql->select("download", "*", "download_category='".intval($this->var['download_category_id'])."' AND download_id > {$dlrow_id} AND download_active > 0 && download_visible IN (".USERCLASS_LIST.") ORDER BY download_datestamp ASC LIMIT 1"))
|
||||
{
|
||||
$dlrowrow = $sql->fetch();
|
||||
extract($dlrowrow);
|
||||
$url = $url = e107::url('download', 'item', $dlrowrow);
|
||||
|
||||
$icon = (deftrue('BOOTSTRAP')) ? $tp->toGlyph('fa-chevron-right') : '>>';
|
||||
$class = empty($parm['class']) ? 'e-tip' : $parm['class'];
|
||||
|
||||
|
||||
|
||||
return "<a class='".$class."' href='".$url."' title=\"".$dlrowrow['download_name']."\">".LAN_NEXT." ".$icon."</a>\n";
|
||||
|
||||
@@ -1097,7 +1101,9 @@ class download_shortcodes extends e_shortcode
|
||||
}
|
||||
else
|
||||
{
|
||||
return " ";
|
||||
$class .= ' disabled';
|
||||
return "<a class='".$class."' href='#' >".LAN_NEXT." ".$icon."</a>\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1110,7 +1116,7 @@ class download_shortcodes extends e_shortcode
|
||||
// e_PLUGIN_ABS."download/download.php?action=list&id=".$this->var['download_category']
|
||||
|
||||
$title = "Back to [x]";
|
||||
$class = empty($parm['class']) ? 'e-tip' : $parm['class'];
|
||||
$class = empty($parm['class']) ? 'e-tip page-link' : $parm['class'];
|
||||
|
||||
return "<a class='".$class."' title=\"".e107::getParser()->lanVars($title,array('x'=>$this->var['download_category_name']))."\" href='".$url."'>".LAN_BACK."</a>";
|
||||
}
|
||||
|
@@ -17,8 +17,8 @@ class download
|
||||
|
||||
private $orderOptions = array('download_id','download_datestamp','download_filesize','download_name','download_author','download_requested');
|
||||
|
||||
private $templateHeader = '';
|
||||
private $templateFooter = '';
|
||||
private $templateHeader;
|
||||
private $templateFooter;
|
||||
|
||||
private $subCategories = array();
|
||||
private $categories = array();
|
||||
@@ -168,19 +168,24 @@ class download
|
||||
{
|
||||
case 'maincats':
|
||||
e107::canonical('download', 'index');
|
||||
e107::route('download/index');
|
||||
break;
|
||||
|
||||
case "list":
|
||||
e107::route('download/category');
|
||||
$this->loadList();
|
||||
break;
|
||||
|
||||
case "view":
|
||||
e107::route('download/item');
|
||||
$this->loadView();
|
||||
break;
|
||||
|
||||
case "report":
|
||||
|
||||
if(check_class($pref['download_reportbroken']))
|
||||
{
|
||||
e107::route('download/report');
|
||||
$this->loadReport();
|
||||
}
|
||||
break;
|
||||
@@ -889,7 +894,7 @@ class download
|
||||
|
||||
global $nextprev_parms;
|
||||
|
||||
$nextprev_parms = http_build_query($nextprev,false,'&'); // 'tmpl_prefix='.deftrue('NEWS_NEXTPREV_TMPL', 'default').'&total='. $total_downloads.'&amount='.$amount.'¤t='.$newsfrom.$nitems.'&url='.$url;
|
||||
$nextprev_parms = http_build_query($nextprev,false); // 'tmpl_prefix='.deftrue('NEWS_NEXTPREV_TMPL', 'default').'&total='. $total_downloads.'&amount='.$amount.'¤t='.$newsfrom.$nitems.'&url='.$url;
|
||||
|
||||
$text .= $tp->parseTemplate($DOWNLOAD_LIST_NEXTPREV, TRUE, $sc);
|
||||
|
||||
@@ -985,7 +990,7 @@ class download
|
||||
</div>
|
||||
<div class='form-group clearfix'> ".$frm->textarea('report_add', '')."</div>
|
||||
<div class='form-group text-center'>
|
||||
".$frm->button('report_download',LAN_dl_45,'submit')."
|
||||
".$frm->button('report_download',LAN_dl_45)."
|
||||
</div>
|
||||
</form>";
|
||||
|
||||
|
@@ -506,18 +506,19 @@ $DOWNLOAD_TEMPLATE['view']['nextprev'] = "
|
||||
*/
|
||||
|
||||
$DOWNLOAD_TEMPLATE['view']['nextprev'] = '
|
||||
<ul class="pager download-view-nextprev">
|
||||
<li class="previous">
|
||||
<nav aria-label="Download Navigation">
|
||||
<ul class="pagination justify-content-between download-view-nextprev">
|
||||
<li class="page-item previous">
|
||||
{DOWNLOAD_VIEW_PREV}
|
||||
</li>
|
||||
<li>
|
||||
<li class="page-item text-center">
|
||||
{DOWNLOAD_BACK_TO_LIST}
|
||||
</li>
|
||||
<li class="next">
|
||||
<li class="page-item next">
|
||||
{DOWNLOAD_VIEW_NEXT}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
';
|
||||
|
||||
// ##### ------------------------------------------------------------------------------------------
|
||||
|
@@ -411,4 +411,9 @@ div.e-debug .label { display: inline; padding: .2em .6em .3em; font
|
||||
div.e-debug .label-danger { background-color: #ee5f5b; }
|
||||
div.e-debug .btn { display: inline-block; margin-bottom: 0; font-weight: 400; text-align: center; vertical-align: middle;
|
||||
cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap;
|
||||
padding: 8px 12px; font-size: 14px; line-height: 1.42857143; border-radius: 4px; user-select: none; }
|
||||
padding: 8px 12px; font-size: 14px; line-height: 1.42857143; border-radius: 4px; user-select: none; }
|
||||
|
||||
/* Bootstrap 5 Shims */
|
||||
.pagination { display: flex !important; }
|
||||
.justify-content-between { justify-content: space-between !important; }
|
||||
.page-link.disabled { pointer-events: none; opacity: 0.5; color: #959595; }
|
Reference in New Issue
Block a user