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

Added catalog page, updated dashboard and added recomendation section #449

Merged
merged 4 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions admin/themes/default/sass/admin-theme.sass
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
@import "controllers/carrier-wizard"
@import "controllers/dashboard"
@import "controllers/login"
@import "controllers/modules_catalog"
@import "controllers/modules"
@import "controllers/search"
@import "controllers/translations"
Expand Down
90 changes: 90 additions & 0 deletions admin/themes/default/sass/controllers/_modules_catalog.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#suggestion-wrapper-placeholder
.panel
text-align: center

#catalog-center-column
padding: 0 30px
.btn.btn-primary
background: #1292FF
border-radius: 5px
.pagination-container
text-align: center
margin-bottom: 12px
.list-container
.list-header
margin-bottom: 40px
.title
font-size: 24px
color: #000000
font-weight: 700
.sort-label
margin-top: 6px
.explore-panel
font-weight: 600
font-size: 16px
color: #000000

.bootstrap
#catalog-center-column
.list-empty
background-color: unset !important


#suggested-modules-list, #suggested-theme-list
.suggested-elements
display: -webkit-box
display: -webkit-flex
display: -ms-flexbox
display: flex
flex-wrap: wrap
margin: 0 -15px
.element-panel
display: flex
flex-direction: column
margin-bottom: 25px
> .panel
border: unset
box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.05)
margin: 0 10px
height: 100%


#suggested-modules-list
.module-info-wrapper
position: relative
height: 100%
.module-logo img
max-height: 60px
margin-bottom: 20px
margin-right: 10px
.panel-action
.module-price
font-size: 14px
font-weight: 700

#suggested-theme-list
.theme-info-wrapper
position: relative
height: 100%
.theme-logo
position: relative
width: 100%
padding-top: 70%
img
position: absolute
top: 0
left: 0
right: 0
bottom: 0
height: 100%
width: 100%
object-fit: cover
border-radius: 5px
.panel-action
.theme-price
font-size: 14px
font-weight: 700

#catalog-center-column
.explore-panel
margin-bottom: 60px
3 changes: 3 additions & 0 deletions admin/themes/default/sass/partials/_commons.sass
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,6 @@

.pointer
cursor: pointer

#recommendation-wrapper
margin-bottom: 20px
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
</div>
</div>
</div>
{include file='recomended-banner.tpl'}
<div class="row" id="recommendation-wrapper" style="display:none">
</div>
<div class="row">
<div class="col-md-8 col-md-push-4 col-lg-7 col-lg-push-3" id="hookDashboardZoneTwo">
<div class='row'>
Expand All @@ -114,9 +117,16 @@
<div class="col-md-4 col-md-pull-8 col-lg-2 col-lg-pull-0" id="hookDashboardZoneThree">
<div class="row">
{$hookDashboardZoneThree}
{if isset($upgrade_info) && $upgrade_info}
<div class="col-sm-12">
<section class="widget panel">
{$upgrade_info->dash_upgrade_panel}
</section>
</div>
{/if}
<div class="col-sm-12">
<section class="dash_links widget panel">
<h3><i class="icon-link"></i> {l s="Useful links"}</h3>
<h3><i class="icon-link"></i> {l s="Help Center"}</h3>
<dl>
<dt><a href="https://qloapps.com/qlo-reservation-system/" class="_blank">{l s="Official Documentation"}</a></dt>
<dd>{l s="Qloapps User Guide"}</dd>
Expand Down
9 changes: 2 additions & 7 deletions admin/themes/default/template/controllers/modules/filters.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
<div class="col-lg-8">
<div class="form-group">
<label>{l s='Filter by'}</label>
<select name="module_install" id="module_install_filter" class="form-control {if isset($showInstalledModules) && $showInstalledModules && $showInstalledModules != 'installedUninstalled' }active{/if}">
<option value="installedUninstalled" {if $showInstalledModules eq 'installedUninstalled'}selected="selected"{/if}>{l s='Installed & Not Installed'}</option>
<option value="installed" {if $showInstalledModules eq 'installed'}selected="selected"{/if}>{l s='Installed Modules'}</option>
<option value="uninstalled" {if $showInstalledModules eq 'uninstalled'}selected="selected"{/if}>{l s='Modules Not Installed '}</option>
</select>
</div>

<div class="form-group">
Expand Down Expand Up @@ -71,10 +66,10 @@
<!-- <span class="pull-right">
<button class="btn btn-default " type="submit" name="resetFilterModules">
<i class="icon-eraser"></i>
{l s='Reset'}
{l s='Reset'}
</button>
<button class="btn btn-default " name="filterModules" id="filterModulesButton" type="submit">
<i class="icon-filter"></i>
<i class="icon-filter"></i>
{l s='Filter'}
</button>
</span> -->
Expand Down
22 changes: 11 additions & 11 deletions admin/themes/default/template/controllers/modules/js.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

if (module_name != '')
$.uiTableFilter($('#moduleContainer').find('table'), module_name);

$('#moduleQuicksearch').on('keyup', function(){
val = this.value;
if ($('#filter_all').hasClass('active'))
Expand All @@ -86,15 +86,15 @@
clearInterval(interval);
interval = null;
}

}, 100);


}).on('keydown', function(e){
if (e.keyCode == 13)
return false;
});

$('input[name="filtername"]').result(function(event, data, formatted) {
$('#filternameForm').submit();
});
Expand All @@ -114,7 +114,7 @@
$(this).attr("rel", "false");
$("input[name=modules]").removeAttr("checked");
}
});
});

// Method to reload filter in ajax
$('.categoryModuleFilterLink').click(function()
Expand Down Expand Up @@ -212,12 +212,12 @@
return false;
}

$(document).on('change', '#module_type_filter, #module_install_filter, #module_status_filter, #country_module_value_filter', function() {
setFilter();
$(document).on('change', '#module_type_filter, #module_install_filter, #module_status_filter, #country_module_value_filter', function() {
setFilter();
});

$('.moduleTabPreferencesChoise').change(function()
{
{
var value_pref = $(this).val();
var module_pref = $(this).attr('name');
module_pref = module_pref.substring(2, module_pref.length);
Expand All @@ -240,7 +240,7 @@
}
});
});

// Method to save favorites preferences
$('.moduleFavorite').change(function()
{
Expand Down Expand Up @@ -309,7 +309,7 @@
else
$('#favorite-count').html(total_favorites-1);
}

},
error: function(res,textStatus,jqXHR)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

<div class="modal-body">
<div class="alert alert-warning">
<h3>{l s='Do you want to install this module that could not be verified by PrestaShop?'}</h3>
<h3>{l s='Do you want to install this module that could not be verified by QloApps?'}</h3>

<p>{l s="This generally happens when the module isn't distributed through our official marketplace, PrestaShop Addons - or when your server failed to communicate with PrestaShop Addons."}</p>
<p>{l s="This generally happens when the module isn't distributed through our official marketplace, QloApps Addons - or when your server failed to communicate with QloApps Addons."}</p>
</div>

<div class="row">
Expand Down Expand Up @@ -59,7 +59,7 @@
<div class="modal-footer">
<div class="alert alert-info">
<p>
{l s='Since you may not have downloaded this module from PrestaShop Addons, we cannot assert that the module is not adding some undisclosed functionalities. We advise you to install it only if you trust the source of the content.'}
{l s='Since you may not have downloaded this module from QloApps Addons, we cannot assert that the module is not adding some undisclosed functionalities. We advise you to install it only if you trust the source of the content.'}
<a id="untrusted-show-risk" href="#"><strong>{l s="What's the risk?"}</strong></a>
</p>
</div>
Expand All @@ -74,13 +74,13 @@

<p>{l s="A module that hasn't been verified may be dangerous and could add hidden functionalities like backdoors, ads, hidden links, spam, etc. Don’t worry, this alert is simply a warning."}</p>

<p>{l s="PrestaShop, being an open-source software, has an awesome community with a long history of developing and sharing high quality modules. Before installing this module, making sure its author is a known community member is always a good idea (by checking [1]our forum[/1] for instance)." tags=['<a href="https://www.prestashop.com/forums/">']}</p>
<p>{l s="QloApps, being an open-source software, has an awesome community with a long history of developing and sharing high quality modules. Before installing this module, making sure its author is a known community member is always a good idea (by checking [1]our forum[/1] for instance)." tags=['<a href="https://forums.qloapps.com/">']}</p>

<h4>{l s='What Should I Do?'}</h4>

<p>{l s="If you trust or find the author of this module to be an active community member, you can proceed with the installation."}

<p>{l s="Otherwise you can look for similar modules on the official marketplace. [1]Click here to browse PrestaShop Addons[/1]." tags=['<a class="catalog-link" href="#">']}
<p>{l s="Otherwise you can look for similar modules on the official marketplace. [1]Click here to browse QloApps Addons[/1]." tags=['<a class="catalog-link" href="https://qloapps.com/addons/" target="_blank">']}

</div>

Expand Down
76 changes: 62 additions & 14 deletions admin/themes/default/template/controllers/modules/page.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,59 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
<ul class=" nav nav-pills">
<li><a href="#mod-alert" data-toggle="tab">{l s="Alert"}&nbsp;<span class="badge {if $module_alerts|@count}badge-danger{else}badge-success{/if}">{$module_alerts|@count}</span></a></li>
<li><a href="#mod-update" data-toggle="tab">{l s="Updates"}&nbsp;<span class="badge {if $upgrade_available|@count}badge-danger{else}badge-success{/if}">{$upgrade_available|@count}</span></a></li>
</ul>
<div class="tab-content">
<div id="mod-alert" class="tab-pane">
<hr>
{if $module_alerts|@count}
<div class="alert alert-warning">
{l s='There are %d alerts regarding your modules.' sprintf=count($module_alerts)}
<ul>
{foreach from=$module_alerts item='alert'}
<li>{$alert}</li>
{/foreach}
</ul>
</div>
{else}
<div class="alert alert-success">
{l s='There are no alerts regarding your modules.'}
</div>
{/if}
</div>
<div id="mod-update" class="tab-pane">
<hr>
{if $upgrade_available|@count}
<div class="alert alert-info">
{l s='An upgrade is available for some of your modules!'}
<ul>
{foreach from=$upgrade_available item='module'}
<li><a href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;anchor={$module.anchor|escape:'html':'UTF-8'}"><b>{$module.displayName|escape:'html':'UTF-8'}</b></a></li>
{/foreach}
</ul>
</div>
{else}
<div class="alert alert-success">
{l s='All modules are up to date!'}
</div>
{/if}
</div>
</div>
</div>
<div class="alert bg-info">
<div class="row modules-addons-info">
<h4>{l s='Explore all QloApps addons'} <a class="btn btn-default _blank" href="https://qloapps.com/addons/"> {l s='QloApps addons'}</a></h4>
</div>
</div>

{$kpis}
{if $add_permission eq '1'}
<div id="module_install" class="row" style="{if !isset($smarty.post.downloadflag)}display: none;{/if}">

<div class="panel col-lg-12">
<form action="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
<form id="module_install_form" action="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
<h3>{l s='Add a new module'}</h3>
<p class="alert alert-info">{l s='The module must either be a Zip file (.zip) or a tarball file (.tar, .tar.gz, .tgz).'}</p>
<div class="form-group">
Expand Down Expand Up @@ -60,26 +102,32 @@
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-push-3">
<button class="btn btn-default" type="submit" name="download">
<button class="btn btn-default" type="submit" name="uploadAndInstall">
<i class="icon-upload-alt" ></i>
{l s='Upload this module'}
{l s='Upload and install this module'}
</button>
</div>
</div>
<div id="module_install_status" class="form-group" style="display:none">
<div class="col-lg-6 col-lg-push-3">
<ul class="list-unstyled">
<li class="mod_status_upload" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Uploading module.'}</li>
<li class="mod_status_check" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Checking module if module is trusted.'}</li>
<li class="mod_status_install" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Installing module.'}</li>
<li class="mod_status_update" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Module already installed, checking and installing updates.'}</li>
<li class="mod_status_rollback" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Rolling back changes.'}</li>
</ul>
<div class="install_msg"></div>
<div class="install_errors" style="display:none">
{l s='Errors.'}
<div class="list"></div>
</div>
</div>
</div>
</form>
</div>
</div>
{/if}
{if $upgrade_available|@count}
<div class="alert alert-info">
{l s='An upgrade is available for some of your modules!'}
<ul>
{foreach from=$upgrade_available item='module'}
<li><a href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;anchor={$module.anchor|escape:'html':'UTF-8'}"><b>{$module.displayName|escape:'html':'UTF-8'}</b></a></li>
{/foreach}
</ul>
</div>
{/if}
<div class="panel">
<div class="panel-heading">
<i class="icon-list-ul"></i>
Expand Down
Loading