Skip to content

Commit

Permalink
4.5.0 - template changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sendtogeo committed Jun 29, 2020
1 parent f456afc commit 468149b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 89 deletions.
48 changes: 14 additions & 34 deletions themes/simple/views/pagespeed/findpagespeedinfo.ctp.php
Original file line number Diff line number Diff line change
@@ -1,51 +1,31 @@
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list">
<table width="100%" class="list">
<tr class="listHead">
<td class="left"><?php echo $spText['common']['Url']?></td>
<td><?php echo $spText['common']['Url']?></td>
<td><?php echo $spTextPS['Desktop Speed']?></td>
<td><?php echo $spTextPS['Mobile Speed']?></td>
<td><?php echo $spTextPS['Mobile Usability']?></td>
<td class="right"><?php echo $spText['common']['Details']?></td>
<td><?php echo $spText['common']['Details']?></td>
</tr>
<?php
$colCount = 5;
$colCount = 4;
if(count($list) > 0){
$catCount = count($list);
$i = 0;
foreach($list as $url){

$class = ($i % 2) ? "blue_row" : "white_row";
if($catCount == ($i + 1)){
$leftBotClass = "tab_left_bot";
$rightBotClass = "tab_right_bot";
}else{
$leftBotClass = "td_left_border td_br_right";
$rightBotClass = "td_br_right";
}
$tdWidth = "25%";
foreach($list as $url) {
$debugVar = !empty($_POST['debug']) ? "&debug=1" : "";
$debugVar .= !empty($_POST['debug_format']) ? "&debug_format=" . $_POST['debug_format'] : "" ;
$debugVar .= !empty($_POST['debug_format']) ? "&debug_format=" . $_POST['debug_format'] : "" ;
?>
<tr class="<?php echo $class?>">
<td class="<?php echo $leftBotClass?>" style="text-align:left;padding-left:10px;"><?php echo $url?></td>
<td class="td_br_right"><?php echo $reportList[$url]['desktop']['speed_score'] ? $reportList[$url]['desktop']['speed_score'] : 0;?> / 100</td>
<td class="td_br_right"><?php echo $reportList[$url]['mobile']['speed_score'] ? $reportList[$url]['mobile']['speed_score'] : 0;?> / 100</td>
<td class="td_br_right"><?php echo $reportList[$url]['mobile']['usability_score'] ? $reportList[$url]['mobile']['usability_score'] : 0;?> / 100</td>
<td class="<?php echo $rightBotClass?>">
<a href="javascript:void(0);" onclick="scriptDoLoadDialog('index.php', 'tmp', 'sec=showdiv&div_id=details_id<?php echo $i?>', 1000, 800)"><?php echo $spText['common']['Details']?> >></a>
<div id="details_id<?php echo $i?>" style="display: none;">
<?php include(SP_VIEWPATH."/pagespeed/pagespeeddetails.ctp.php");?>
</div>
<tr>
<td style="text-align:left;padding-left:10px;"><?php echo $url?></td>
<td><?php echo $reportList[$url]['desktop']['speed_score'] ? $reportList[$url]['desktop']['speed_score'] : 0;?> / 100</td>
<td><?php echo $reportList[$url]['mobile']['speed_score'] ? $reportList[$url]['mobile']['speed_score'] : 0;?> / 100</td>
<td>
<a href="https://developers.google.com/speed/pagespeed/insights/?url=<?php echo $url; ?>" target="_blank">
<?php echo $spText['common']['Details']?> &gt;&gt;
</a>
</td>
</tr>
<?php
$i++;
}
}else{
echo showNoRecordsList($colCount-2);
}
?>
<tr class="listBot">
<td class="left" colspan="<?php echo ($colCount-1)?>"></td>
<td class="right"></td>
</tr>
</table>
70 changes: 19 additions & 51 deletions themes/simple/views/pagespeed/pagespeedreport.ctp.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<?php echo showSectionHead($spTextTools['PageSpeed Reports']); ?>
<?php
echo showSectionHead($spTextTools['PageSpeed Reports']);
$webUrl = "";
?>
<form id='search_form'>
<table width="100%" class="search">
<tr>
<th><?php echo $spText['common']['Website']?>: </th>
<td>
<select name="website_id" id="website_id" style='width:190px;' onchange="scriptDoLoadPost('pagespeed.php', 'search_form', 'content', '&sec=reports')">
<?php foreach($websiteList as $websiteInfo){?>
<?php if($websiteInfo['id'] == $websiteId){?>
<?php
if($websiteInfo['id'] == $websiteId){
$webUrl = $websiteInfo['url'];
?>
<option value="<?php echo $websiteInfo['id']?>" selected><?php echo $websiteInfo['name']?></option>
<?php }else{?>
<option value="<?php echo $websiteInfo['id']?>"><?php echo $websiteInfo['name']?></option>
Expand Down Expand Up @@ -41,69 +47,31 @@
<div id='subcontent'>
<table width="100%" class="list">
<tr class="listHead">
<td class="left"><?php echo $spText['common']['Date']?></td>
<td><?php echo $spText['common']['Date']?></td>
<td><?php echo $spTextPS['Desktop Speed']?></td>
<td><?php echo $spTextPS['Mobile Speed']?></td>
<td class="right"><?php echo $spTextPS['Mobile Usability']?></td>
<td><?php echo $spText['common']['Details']?></td>
</tr>
<?php
$colCount = 4;
if(count($list) > 0){
$catCount = count($list);
$i = 0;
foreach($list as $listInfo){

$class = ($i % 2) ? "blue_row" : "white_row";
if($catCount == ($i + 1)){
$leftBotClass = "tab_left_bot";
$rightBotClass = "tab_right_bot";
}else{
$leftBotClass = "td_left_border td_br_right";
$rightBotClass = "td_br_right";
}
foreach($list as $listInfo){
?>
<tr class="<?php echo $class?>">
<td class="<?php echo $leftBotClass?>"><?php echo $listInfo['result_date']; ?></td>
<td class='td_br_right' style='text-align:left;padding-left:40px;'><a><?php echo $listInfo['desktop_speed_score'].'</a> '. $listInfo['rank_diff_desktop_speed_score']?></td>
<td class='td_br_right' style='text-align:left;padding-left:40px;'><a><?php echo $listInfo['mobile_speed_score'].'</a> '. $listInfo['rank_diff_mobile_speed_score']?></td>
<td class='<?php echo $rightBotClass?>' style='text-align:left;padding-left:40px;'>
<a><?php echo $listInfo['mobile_usability_score'].'</a> '. $listInfo['rank_diff_mobile_usability_score']?>
<?php
if ($i == 0) {

// if loaded through popup
if ($fromPopUp) {
$detailsLink = "scriptDoLoad('index.php', 'popup_tmp', 'sec=showdiv&div_id=details_id')";
} else {
$detailsLink = "scriptDoLoadDialog('index.php', 'tmp', 'sec=showdiv&div_id=details_id', 1000, 800)";
}
?>
&nbsp;&nbsp;
<a href="javascript:void(0);" onclick="<?php echo $detailsLink;?>"><?php echo $spText['common']['Details']?> >></a>
<div id="details_id" style="display: none;">
<?php
$url = "http://website:com";
$reportList[$url]['desktop']['details'] = unserialize($detailsInfo['desktop_score_details']);
$reportList[$url]['desktop']['speed_score'] = $listInfo['desktop_speed_score'];
$reportList[$url]['mobile']['details'] = unserialize($detailsInfo['mobile_score_details']);
$reportList[$url]['mobile']['speed_score'] = $listInfo['mobile_speed_score'];
$reportList[$url]['mobile']['usability_score'] = $listInfo['mobile_usability_score'];
include(SP_VIEWPATH."/pagespeed/pagespeeddetails.ctp.php");
?>
</div>
<?php }?>
<tr>
<td><?php echo $listInfo['result_date']; ?></td>
<td><a><?php echo $listInfo['desktop_speed_score'].'</a> '. $listInfo['rank_diff_desktop_speed_score']?></td>
<td><a><?php echo $listInfo['mobile_speed_score'].'</a> '. $listInfo['rank_diff_mobile_speed_score']?></td>
<td>
<a href="https://developers.google.com/speed/pagespeed/insights/?url=<?php echo $webUrl; ?>" target="_blank">
<?php echo $spText['common']['Details']?> &gt;&gt;
</a>
</td>
</tr>
<?php
$i++;
}
}else{
echo showNoRecordsList($colCount-2);
}
?>
<tr class="listBot">
<td class="left" colspan="<?php echo ($colCount-1)?>"></td>
<td class="right"></td>
</tr>
</table>
</div>
5 changes: 1 addition & 4 deletions themes/simple/views/report/archive.ctp.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
<?php
if (!empty($websiteStats)) {
echo showSectionHead($spTextHome['Website Statistics']);
$colSpan = 15;
$colSpan = 14;
if (empty($pdfVersion)) echo $websitePagingDiv;
?>
<table id="cust_tab">
Expand All @@ -246,7 +246,6 @@
<th>Bing</th>
<th><?php echo $spTextPS['Desktop Speed']?></th>
<th><?php echo $spTextPS['Mobile Speed']?></th>
<th><?php echo $spTextPS['Mobile Usability']?></th>
<th><?php echo $spText['common']['Total']?></th>
<th><?php echo $spText['common']['Active']?></th>
</tr>
Expand All @@ -269,7 +268,6 @@
$activeDirLink = scriptAJAXLinkHrefDialog('directories.php', 'content', "sec=reports&active=approved&&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['dirsub']['active']);
$desktopPageSpeedLink = scriptAJAXLinkHrefDialog('pagespeed.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['desktop_speed_score']);
$mobilePageSpeedLink = scriptAJAXLinkHrefDialog('pagespeed.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['mobile_speed_score']);
$mobileUsabilityLink = scriptAJAXLinkHrefDialog('pagespeed.php', 'content', "sec=reports&website_id=".$websiteInfo['id'] . $timeArg, $websiteInfo['mobile_usability_score']);
?>
<tr>
<td>
Expand All @@ -286,7 +284,6 @@
<td><?php echo $bingIndexLInk; ?></td>
<td><?php echo $desktopPageSpeedLink; ?></td>
<td><?php echo $mobilePageSpeedLink; ?></td>
<td><?php echo $mobileUsabilityLink; ?></td>
<td><?php echo $totaldirLink?></td>
<td><?php echo $activeDirLink?></td>
</tr>
Expand Down

0 comments on commit 468149b

Please sign in to comment.