Skip to content

Commit

Permalink
Merge pull request #6134 from Quetzacoalt91/fix-product-type-module-page
Browse files Browse the repository at this point in the history
Fix services and buttons on module page
  • Loading branch information
Maxime Biloé committed Aug 31, 2016
2 parents 895e24c + ae167f3 commit b5b9f7b
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 123 deletions.
57 changes: 27 additions & 30 deletions admin-dev/themes/new-theme/scss/pages/_modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,41 +101,38 @@

.module-item-wrapper-list {

.module-item-heading-list {
@media (max-width: 33.9em) {
text-align: center;
}

> .module-logo-thumb-list {
height:64px;
max-width:64px;
margin: 0 auto;
@media (max-width: 33.9em) {
text-align: center;
}

> .module-logo-thumb-list {
height:64px;
max-width:64px;
margin: 0 auto;
@media (max-width: 33.9em) {
height: auto;
max-height: 64px;
}
img {
width: 100%;
max-width: 64px;
margin-bottom: 0.5em;
}
height: auto;
max-height: 64px;
}
> .module-name-list {
font-weight: bolder;
color: $gray;
margin: 0;
img {
width: 100%;
max-width: 64px;
margin-bottom: 0.5em;
}
> .module-version-author-list {
}
.module-name-list {
font-weight: bolder;
color: $gray;
margin: 0;
}
> .module-version-author-list {
font-weight: bold;
color: $gray-medium;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
b {
font-weight: bold;
color: $gray-medium;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
b {
font-weight: bold;
color: $gray-dark;
}
color: $gray-dark;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/Adapter/Module/AdminModuleDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ protected function loadCatalogData()
$addon->categoryParent = $this->categoriesProvider
->getParentCategory($addon->categoryName)
;
$addon->productType = $addon->product_type;
$listAddons[$addon->name] = $addon;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
{% else %}{{ 'Discover'|trans({}, 'Admin.Modules.Feature') }}{% endif %}
</a>
{% else %}
<div class="module-quick-action-grid">
<a class="btn btn-primary-reverse btn-primary-outline light-button module_action_menu_{{ url_active }}" href="{{ urls[url_active] }}" data-confirm_modal="module-modal-confirm-{{ name }}-{{ url_active }}">{{ url_active|capitalize|replace({'_': " "}) }}</a>
</div>
{% if urls|length > 1 %}
<button type="button" class="btn btn-primary-outline dropdown-toggle light-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% set isModuleActive = module.database.active|default('0') %}
{% set productType = module.attributes.serviceUrl is defined and module.attributes.serviceUrl|length > 0 ? 'service' : 'module' %}

<div
class="module-item module-item-grid col-md-12 col-lg-6 col-xl-4 {% if origin == 'manage' and isModuleActive == '0' %}module-item-grid-isNotActive{% endif %}"
Expand All @@ -13,7 +12,7 @@
data-tech-name="{{ module.attributes.name }}"
data-child-categories="{{ module.attributes.categoryName }}"
data-categories="{{ module.attributes.categoryParent }}"
data-type="{{ productType }}"
data-type="{{ module.attributes.productType }}"
data-price="{{ module.attributes.price.raw }}"
data-active="{{ isModuleActive }}"
>
Expand All @@ -36,7 +35,7 @@
</h3>
<div class="text-ellipsis xsmall module-version-author-grid">
{% block addon_version %}
{% if productType == "service" %}
{% if module.attributes.productType == "service" %}
{{ 'Service by '|trans({}, 'Admin.Modules.Feature') }}
<b>{{ module.attributes.author }}</b>
{% else %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% set isModuleActive = module.database.active|default('0') %}
{% set productType = module.attributes.serviceUrl is defined and module.attributes.serviceUrl|length > 0 ? 'service' : 'module' %}

<div
class="module-item module-item-list col-md-12 {% if origin == 'manage' and isModuleActive == '0' %}module-item-list-isNotActive{% endif %}"
Expand All @@ -13,14 +12,14 @@
data-tech-name="{{ module.attributes.name }}"
data-child-categories="{{ module.attributes.categoryName }}"
data-categories="{{ module.attributes.categoryParent }}"
data-type="{{ productType }}"
data-type="{{ module.attributes.productType }}"
data-price="{{ module.attributes.price.raw }}"
data-active="{{ isModuleActive }}"
>
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-2 col-lg-1 text-sm-center" style="min-height: 100%;">
<img src="{{ module.attributes.img }}" class="text-md-center" style="max-width: 100%" alt="{{ module.attributes.displayName }}"/>
<div class="module-item-wrapper-list row">
<div class="module-logo-thumb-list col-sm-12 col-md-12 col-lg-1 text-sm-center">
<img src="{{ module.attributes.img }}" class="text-md-center" alt="{{ module.attributes.displayName }}"/>
</div>
<div class="col-sm-12 col-md-10 col-lg-11">
<h3
Expand All @@ -39,7 +38,7 @@
<div class="col-sm-12 col-md-2">
<span class="text-ellipsis xsmall">
{% block addon_version %}
{% if productType == "service" %}
{% if module.attributes.productType == "service" %}
{{ 'Service by '|trans({}, 'Admin.Modules.Feature') }}
<b>{{ module.attributes.author }}</b>
{% else %}
Expand Down

0 comments on commit b5b9f7b

Please sign in to comment.