separating service template from process.tpl to service_process.tpl - refs BT#11338

pull/2495/head
Alex Aragón 8 years ago
parent 29d861af96
commit 3e77f7d09d
  1. 2
      plugin/buycourses/src/service_process.php
  2. 81
      plugin/buycourses/view/service_process.tpl

@ -24,7 +24,7 @@ $serviceId = intval($_REQUEST['i']);
if (empty($currentUserId)) { if (empty($currentUserId)) {
api_not_allowed(true); api_not_allowed(true);
} }
$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>';
$em = Database::getManager(); $em = Database::getManager();
$plugin = BuyCoursesPlugin::create(); $plugin = BuyCoursesPlugin::create();
$includeServices = $plugin->get('include_services'); $includeServices = $plugin->get('include_services');

@ -25,7 +25,42 @@
</div> </div>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<div class="buy-item">
<h3 class="title">
<a href='{{ _p.web }}service/{{ service.id }}'>{{ service.name }}</a>
</h3>
{% if course.description %}
<div class="description">
{{ course.description }}
</div>
{% endif %}
<ul class="fa-ul">
{% if service.applies_to %}
<li>
<em class="fa-li fa fa-hand-o-right" aria-hidden="true"></em>
{% if service.applies_to == 0 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'None'|get_lang }}
{% elseif service.applies_to == 1 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'User'|get_lang }}
{% elseif service.applies_to == 2 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'Course'|get_lang }}
{% elseif service.applies_to == 3 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'Session'|get_lang }}
{% elseif service.applies_to == 4 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'TemplateTitleCertificate'|get_lang }}
{% endif %}
</li>
{% endif %}
<li>
<em class="fa-li fa fa-money" aria-hidden="true"></em>
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}
: {{ service.currency == 'BRL' ? 'R$' : service.currency }} {{ service.price }}
/ {{ service.duration_days == 0 ? 'NoLimit'|get_lang : service.duration_days ~ ' ' ~ 'Days'|get_lang }}
</li>
<li><em class="fa-li fa fa-user" aria-hidden="true"></em> {{ service.owner_name }}</li>
<li><em class="fa-li fa fa-align-justify" aria-hidden="true"></em> {{ service.description }}</li>
</ul>
</div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
@ -38,50 +73,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12">
<div class="thumbnail">
{% if buying_service %}
<div class="caption">
<h3>
<a href='{{ _p.web }}service/{{ service.id }}'>{{ service.name }}</a>
</h3>
<ul class="fa-ul">
{% if service.applies_to %}
<li>
<em class="fa-li fa fa-hand-o-right" aria-hidden="true"></em>
{% if service.applies_to == 0 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'None'|get_lang }}
{% elseif service.applies_to == 1 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'User'|get_lang }}
{% elseif service.applies_to == 2 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'Course'|get_lang }}
{% elseif service.applies_to == 3 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'Session'|get_lang }}
{% elseif service.applies_to == 4 %}
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'TemplateTitleCertificate'|get_lang }}
{% endif %}
</li>
{% endif %}
<li>
<em class="fa-li fa fa-money" aria-hidden="true"></em>
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}
: {{ service.currency == 'BRL' ? 'R$' : service.currency }} {{ service.price }}
/ {{ service.duration_days == 0 ? 'NoLimit'|get_lang : service.duration_days ~ ' ' ~ 'Days'|get_lang }}
</li>
<li><em class="fa-li fa fa-user" aria-hidden="true"></em> {{ service.owner_name }}</li>
<li><em class="fa-li fa fa-align-justify" aria-hidden="true"></em> {{ service.description }}</li>
</ul>
<p id="n-price" class="lead text-right" style="color: white;">
<span class="label label-primary"></span>
</p>
<p id="s-price" class="lead text-right"></p>
</div>
{% endif %}
</div>
</div>
</div>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
$("label").removeClass('control-label'); $("label").removeClass('control-label');

Loading…
Cancel
Save