-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy path_learning_path.html.erb
More file actions
47 lines (40 loc) · 1.8 KB
/
Copy path_learning_path.html.erb
File metadata and controls
47 lines (40 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<% cache(learning_path, expires_in: 1.hour) do %>
<li class="masonry-brick media-item large block-item learning-path-bg-<%= (learning_path.id % 4) + 1 -%>">
<%= link_to learning_path, class: 'link-overlay' do %>
<%= item_order_badge(collection_item) if defined? collection_item %>
<div class="masonry-brick-heading">
<div class="masonry-icons">
<% if current_user&.is_admin? %>
<%= missing_icon(learning_path) %>
<%= scrape_status_icon(learning_path) %>
<%= suggestion_icon(learning_path) %>
<% end %>
</div>
<div class="sub-heading">
<%= display_attribute_no_label(learning_path, :learning_path_type) %>
</div>
<h4 class="mb-3"><%= learning_path.title %></h4>
<%= rand %>
</div>
<div class="clearfix">
<div class="pull-right">
<% if controller_name != 'content_providers' && learning_path.content_provider %>
<%= image_tag(learning_path.content_provider.image.url, class: 'provider-avatar') %>
<% end %>
</div>
<div>
<% competency = display_difficulty_level(learning_path.difficulty_level) %>
<% if competency %>
<span class="label label-default"><%= competency %></span>
<% end %>
<span class="label label-default"><i class="fa fa-folder-open"></i> <%= pluralize(learning_path.topics.count, 'topic') %></span>
<span class="label label-default"><i class="fa fa-book"></i> <%= pluralize(learning_path.topics_materials.count, 'materials') %></span>
</div>
<div>
<%= keywords_and_topics(learning_path, limit: 10) %>
</div>
</div>
<%= item_comment(collection_item) if defined? collection_item %>
<% end %>
</li>
<% end %>