- content_for :title do
= t('shop')
.col-md-3
.list-group
= link_to t('all_categories'), root_path, class: "list-group-item #{'active' if current_page?(root_path) || current_page?(items_path)}"
- Category.all.each do |category|
= link_to category.name, items_by_category_path(category_id: category.slug), class: "list-group-item #{'active' if current_page?(items_by_category_path(category_id: category.slug))}"
.list-group
= link_to t('all_teachers'), root_path, class: "list-group-item #{'active' if params[:teacher].nil?}"
- Item.all_teachers_for_locale(I18n.locale).each do |teacher|
= link_to teacher, url_for(teacher: teacher), class: "list-group-item #{'active' if params[:teacher] == teacher}"
.col-md-9
.row
- if @items.any?
- @items.each do |item|
.col-sm-4.col-lg-4.col-md-4
.thumbnail
= link_to image_tag(item.picture.thumbnail.url), item
.caption
%h4.pull-right= number_to_currency(item.price)
%h4
= link_to item.name, item
%p.description.dotdotdot
= truncate_item_description(item.description)
.buttons.clearfix
- if item.publicly_available?
= link_to item_path(item), class: 'btn btn-info pull-right' do
%i.fa.fa-download
= t('links.download')
- else
- if item.has_been_bought_by(current_user)
%span.text-success
%i.fa.fa-check
= t('purchased')
= link_to item_path(item), class: 'btn btn-info pull-right' do
%i.fa.fa-download
= t('links.download')
- else
= link_to item, class: 'btn btn-success' do
%i.fa.fa-euro
= t('links.purchase')
- else
.col-sm-4.col-lg-4.col-md-4
Aucun élément dans cette catégorie.