Skip to content

Commit f4f4298

Browse files
author
Natalia Momotenko
committed
Merge remote-tracking branch 'origin/MAGETWO-44791' into PR-4
2 parents 245328b + 7318a8e commit f4f4298

File tree

5 files changed

+85
-57
lines changed

5 files changed

+85
-57
lines changed

app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@
88

99
?>
1010
<?php if ($block->getRating() && $block->getRating()->getSize()): ?>
11-
<div class="nested">
12-
<?php foreach ($block->getRating() as $_rating): ?>
13-
<div class="field field-rating">
14-
<label class="label"><span><?php echo $block->escapeHtml($_rating->getRatingCode()) ?></span></label>
15-
<?php $_iterator = 1; ?>
16-
<?php $_options = ($_rating->getRatingOptions()) ? $_rating->getRatingOptions() : $_rating->getOptions() ?>
17-
<div class="control" data-widget="ratingControl">
18-
<?php foreach (array_reverse($_options) as $_option): ?>
19-
<input type="radio" name="ratings[<?php /* @escapeNotVerified */ echo($_rating->getVoteId()) ? $_rating->getVoteId() : $_rating->getId() ?>]" id="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>" value="<?php /* @escapeNotVerified */ echo $_option->getId() ?>" <?php if ($block->isSelected($_option, $_rating)): ?>checked="checked"<?php endif; ?> />
20-
<label for="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>">&#9733;</label>
21-
<?php $_iterator++ ?>
22-
<?php endforeach; ?>
23-
</div>
24-
</div>
11+
<?php foreach ($block->getRating() as $_rating): ?>
12+
<div class="admin__field admin__field-rating">
13+
<label class="admin__field-label"><span><?php echo $block->escapeHtml($_rating->getRatingCode()) ?></span></label>
14+
<?php $_iterator = 1; ?>
15+
<?php $_options = ($_rating->getRatingOptions()) ? $_rating->getRatingOptions() : $_rating->getOptions() ?>
16+
<div class="admin__field-control" data-widget="ratingControl">
17+
<?php foreach (array_reverse($_options) as $_option): ?>
18+
<input type="radio" name="ratings[<?php /* @escapeNotVerified */ echo($_rating->getVoteId()) ? $_rating->getVoteId() : $_rating->getId() ?>]" id="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>" value="<?php /* @escapeNotVerified */ echo $_option->getId() ?>" <?php if ($block->isSelected($_option, $_rating)): ?>checked="checked"<?php endif; ?> />
19+
<label for="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>">&#9733;</label>
20+
<?php $_iterator++ ?>
2521
<?php endforeach; ?>
26-
<input type="hidden" name="validate_rating" class="validate-rating" value="" />
22+
</div>
2723
</div>
24+
<?php endforeach; ?>
25+
<input type="hidden" name="validate_rating" class="validate-rating" value="" />
2826
<script>
2927
require([
3028
"jquery",
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Copyright © 2015 Magento. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
//
7+
// Variables
8+
// _____________________________________________
9+
10+
@rating-star__font-size: 18px;
11+
@rating-star__height: 13px;
12+
@rating-star__width: 18px;
13+
14+
//
15+
// Customer Reviews
16+
// ---------------------------------------------
17+
18+
.field-detailed_rating {
19+
.admin__field-rating {
20+
margin: 15px 0 0;
21+
&:first-child {
22+
margin-top: 0;
23+
}
24+
.admin__field-label {
25+
display: inline-block;
26+
line-height: @line-height__base;
27+
text-align: left;
28+
vertical-align: top;
29+
width: 75px;
30+
}
31+
.admin__field-control {
32+
direction: rtl;
33+
display: inline-block;
34+
margin: -4px 0 0;
35+
unicode-bidi: bidi-override;
36+
vertical-align: top;
37+
width: 125px;
38+
label {
39+
color: @color-gray80;
40+
cursor: pointer;
41+
float: right;
42+
font-size: @rating-star__font-size;
43+
overflow: hidden;
44+
transition: color 150ms linear;
45+
white-space: nowrap;
46+
width: @rating-star__width;
47+
&:before {
48+
display: none;
49+
}
50+
}
51+
}
52+
}
53+
input[type="radio"] {
54+
display: none;
55+
}
56+
}
57+
58+
.field-summary_rating {
59+
.rating-box {
60+
background: url("@{baseDir}images/rating-bg.png") repeat-x 0 0;
61+
font-size: 0;
62+
height: @rating-star__height;
63+
line-height: 0;
64+
margin: 4px 0 0;
65+
overflow: hidden;
66+
width: @rating-star__width*5;
67+
.rating {
68+
background: url("@{baseDir}images/rating-bg.png") repeat-x 0 -@rating-star__height;
69+
height: @rating-star__height;
70+
}
71+
}
72+
}

app/design/adminhtml/Magento/backend/web/css/styles-old.less

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,48 +2169,6 @@
21692169
}
21702170
}
21712171

2172-
//
2173-
// Customer Reviews
2174-
// --------------------------------------
2175-
.field-detailed_rating {
2176-
.control-value {
2177-
padding: 0;
2178-
}
2179-
.nested {
2180-
padding: 0;
2181-
}
2182-
.field-rating {
2183-
margin: 15px 0 0;
2184-
&:first-child {
2185-
margin-top: 0;
2186-
}
2187-
.label {
2188-
width: 75px;
2189-
}
2190-
.control {
2191-
unicode-bidi: bidi-override;
2192-
direction: rtl;
2193-
width: 125px;
2194-
label {
2195-
color: #ccc;
2196-
cursor: pointer;
2197-
font-size: 18px;
2198-
float: right;
2199-
overflow: hidden;
2200-
white-space: nowrap;
2201-
width: 18px;
2202-
transition: color 150ms linear;
2203-
&:before {
2204-
display: none;
2205-
}
2206-
}
2207-
}
2208-
}
2209-
input[type="radio"] {
2210-
display: none;
2211-
}
2212-
}
2213-
22142172
//
22152173
// Tree Store Scope
22162174
// --------------------------------------
Loading
Binary file not shown.

0 commit comments

Comments
 (0)