-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy path_item.html.haml
More file actions
34 lines (27 loc) · 1.38 KB
/
_item.html.haml
File metadata and controls
34 lines (27 loc) · 1.38 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
:ruby
organization ||= raise ArgumentError, "organization is required in view partial #{__FILE__}"
sources = organization.sources.enabled
- cache organization do
.organization-item
.organization
.organization-title= organization.name
.organization-source-actions
.add-source= link_to t('.sources.add'), new_organization_source_path(organization), :class => 'action-btn', :style => 'padding: 3px 5px'
.show-sources= link_to t('.sources.show'), '#', :class => 'action-btn', :style => 'padding: 3px 5px'
- if organization.url?
%h2.organization-url-title= t('.url.title')
.organization-url= link_to organization.url, organization.url, :target => '_blank'
%h2.organization-description-title= t('.description.title')
.organization-description{:class => (organization.description? ? '' : 'no-content')}
= organization.description.presence || t('.description.none')
.organization-topics<
- organization.topics.each do |topic|
= link_to topic.name, '#', :class => 'topic'
.organization-sources-container
%h2.organization-sources-title= t('.sources.title')
.organization-sources.sources-list.list
- if sources.any?
- sources.each do |source|
= render 'sources/index_item', :source => source
- else
.no-sources= t('.sources.none')