Skip to content

Commit f54e467

Browse files
committed
Slightly different about page for spaces
1 parent f9e1747 commit f54e467

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

app/views/about/tess.html.erb

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,33 @@
55

66
<div id="content">
77
<div class="about-block">
8-
<h2><%== TeSS::Config.site['title'] %></h2>
9-
<p><%== t 'about.registry' %></p>
10-
11-
<p><%== t 'about.history' %></p>
8+
<% if current_space.default? %>
9+
<h2><%== TeSS::Config.site['title'] %></h2>
10+
<p><%== t 'about.registry' %></p>
11+
12+
<p><%== t 'about.history' %></p>
13+
<% else %>
14+
<h2><%= current_space.title %></h2>
15+
<p><%= render_markdown(current_space.description) %></p>
16+
<% if current_space.user %>
17+
<div>
18+
<%= t 'about.spaces.owner' %>
19+
<ul>
20+
<li><%= link_to current_space.user.name, current_space.user %></li>
21+
</ul>
22+
</div>
23+
<% end %>
24+
<% if current_space.administrators.any? %>
25+
<div>
26+
<%= t 'about.spaces.admins' %>
27+
<ul>
28+
<% current_space.administrators.each do |admin| %>
29+
<li><%= link_to admin.name, admin %></li>
30+
<% end %>
31+
</ul>
32+
</div>
33+
<% end %>
34+
<% end %>
1235

1336
<% @feature_count = 0 %>
1437

@@ -22,7 +45,7 @@
2245
<div class="col-lg-10 col-lg-pull-2 about-resource">
2346
<p><%== t 'about.events' %></p>
2447

25-
<p><%== t('about.collect_events', site_name: TeSS::Config.site['title_short'], count: Event.distinct.count(:content_provider_id), nominatim: t('about.nominatim')) %></p>
48+
<p><%== t('about.collect_events', site_name: current_space.title, count: Event.distinct.count(:content_provider_id), nominatim: t('about.nominatim')) %></p>
2649

2750
<br/>
2851

@@ -45,7 +68,7 @@
4568
<div class="col-lg-10 col-lg-pull-2 about-resource">
4669
<p><%== t 'about.materials' %></p>
4770

48-
<p><%== t('about.collect_materials', site_name: TeSS::Config.site['title_short'], count: Material.distinct.count(:content_provider_id)) %>
71+
<p><%== t('about.collect_materials', site_name: current_space.title, count: Material.distinct.count(:content_provider_id)) %>
4972
</p>
5073

5174
<br/>

config/locales/en.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ en:
158158
discover_materials: Discover Materials
159159
discover_learning_paths: Discover Learning Paths
160160
discover_workflows: Discover Workflows
161+
spaces:
162+
owner: "The owner of this space is:"
163+
admins: "The administrators of this space are:"
161164
developer:
162165
license: >
163166
TeSS is committed to the FAIR principles: making data findable, accessible, interoperable and re-usable.

0 commit comments

Comments
 (0)