Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions app/views/spaces/_space.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,26 @@
<%= image_tag get_image_url_for(space), class: "media-image listing_image pull-right space-logo", style: (theme_colour ? "background-color: #{theme_colour}" : nil) %>
<h4 class="mb-2 mt-3" style="<%= theme_colour ? "color: #{theme_colour}" : ''-%>">
<%= space.title %>
<% if space.is_private %>
<i class='glyphicon glyphicon-lock' style="font-size: 18px; margin-left: 5px"></i>
<% end %>
</h4>

<span class="muted"><%= space.url %></span>

<br>

<% if space.administrators.any? %>
<span class="muted">Administrators: <%= space.administrators.pluck(:username).join(", ") %></span>
<br>
<% end %>

<% if space.is_private %>
<div class="muted" style="display: inline;">
Groups authorized: <%= space.groups.pluck(:title).join(", ") %>
</div>
<% end %>

<% if space.materials.length > 0 %>
<div><strong><%= pluralize(space.materials.length, 'training material') %></strong></div>
<% end %>
Expand Down
10 changes: 10 additions & 0 deletions app/views/spaces/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
<div class="my-3">
<%= display_attribute(@space, :url) %>

<% if @space.administrators.any? %>
<p><div class="text-primary">Administrators:</div> <%= @space.administrators.pluck(:username).join(", ") %></p>
<% end %>

<% if @space.is_private %>
<div style="display: inline;">
<span class="text-primary">Groups authorized:</span> <%= @space.groups.pluck(:title).join(", ") %>
</div>
<% end %>

<div class="description">
<%= render_markdown @space.description %>
</div>
Expand Down