richie 3.1.3.dev28__py2.py3-none-any.whl → 3.1.3.dev31__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of richie might be problematic. Click here for more details.

@@ -70,6 +70,7 @@
70
70
  & .product-widget__header-main {
71
71
  display: flex;
72
72
  justify-content: center;
73
+ text-align: center;
73
74
  }
74
75
 
75
76
  & .product-widget__title {
@@ -399,6 +399,7 @@ $course-glimpse-content-padding-sides: 0.7rem !default;
399
399
  .offer_prices {
400
400
  display: flex;
401
401
  flex-direction: column;
402
+ align-items: flex-end;
402
403
  }
403
404
 
404
405
  .offer__price {
@@ -683,6 +683,15 @@ class Course(EsIdMixin, BasePageExtension):
683
683
  return self.best_course_run.price
684
684
  return None
685
685
 
686
+ @property
687
+ def discounted_price(self):
688
+ """
689
+ Returns the discounted price of the course run with the best state.
690
+ """
691
+ if self.best_course_run:
692
+ return self.best_course_run.discounted_price
693
+ return None
694
+
686
695
  @property
687
696
  def certificate_offer(self):
688
697
  """
@@ -701,6 +710,15 @@ class Course(EsIdMixin, BasePageExtension):
701
710
  return self.best_course_run.certificate_price
702
711
  return None
703
712
 
713
+ @property
714
+ def discounted_certificate_price(self):
715
+ """
716
+ Returns the discounted certificate price of the course run with the best state.
717
+ """
718
+ if self.best_course_run:
719
+ return self.best_course_run.discounted_certificate_price
720
+ return None
721
+
704
722
  def copy_relations(self, oldinstance, language=None):
705
723
  """
706
724
  This method is called for 2 types of copying:
@@ -117,7 +117,14 @@
117
117
  <use href="#icon-offer-{{course.offer|default:'free'}}" />
118
118
  </svg>
119
119
  {% if course.offer != 'free' and course.price %}
120
- <span class="offer__price">{{ course.price|currency:course.price_currency }}</span>
120
+ {% if course.discounted_price %}
121
+ <div class="offer_prices">
122
+ <span class="offer__price offer__price--striked">{{ course.price|currency:course.price_currency }}</span>
123
+ <span class="offer__price offer__price--discounted">{{ course.discounted_price|currency:course.price_currency }}</span>
124
+ </div>
125
+ {% else %}
126
+ <span class="offer__price">{{ course.price|currency:course.price_currency }}</span>
127
+ {% endif %}
121
128
  {% endif %}
122
129
  </div>
123
130
  </div>