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.
- frontend/js/widgets/SyllabusCourseRunsList/components/CourseProductItem/_styles.scss +1 -0
- frontend/scss/objects/_course_glimpses.scss +1 -0
- richie/apps/courses/models/course.py +18 -0
- richie/apps/courses/templates/courses/cms/fragment_course_glimpse.html +8 -1
- richie/static/richie/css/main.css +1 -1
- {richie-3.1.3.dev28.dist-info → richie-3.1.3.dev31.dist-info}/METADATA +1 -1
- {richie-3.1.3.dev28.dist-info → richie-3.1.3.dev31.dist-info}/RECORD +11 -11
- {richie-3.1.3.dev28.dist-info → richie-3.1.3.dev31.dist-info}/WHEEL +0 -0
- {richie-3.1.3.dev28.dist-info → richie-3.1.3.dev31.dist-info}/licenses/LICENSE +0 -0
- {richie-3.1.3.dev28.dist-info → richie-3.1.3.dev31.dist-info}/top_level.txt +0 -0
- {richie-3.1.3.dev28.dist-info → richie-3.1.3.dev31.dist-info}/zip-safe +0 -0
|
@@ -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
|
-
|
|
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>
|