Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F461596
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, May 18, 4:41 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, May 20, 4:41 AM (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
220350
Attached To
rWEBDNS WebDNS (edet4)
View Options
diff --git a/app/views/domains/index.html.erb b/app/views/domains/index.html.erb
index a75eb45..47058bc 100644
--- a/app/views/domains/index.html.erb
+++ b/app/views/domains/index.html.erb
@@ -1,34 +1,50 @@
+<% if current_user.memberships.empty? %>
+ <div class="jumbotron">
+ <h2>Wellcome to WebDNS!</h2>
+ <p>
+ In order to manage domains you have to be a member of a group.
+ </p>
+ <p>
+ You can either contact an admin to create a new group for you, or ask another user for an invite to an existing group.
+ </p>
+ </div>
+<% end %>
+
<table class="table table-striped">
<thead>
</thead>
<tbody>
<% @domains.group_by(&:group).each do |group, domains| %>
<tr>
<th colspan="2"><%= link_to group.name, group_path(group) %></th>
<th colspan="2">Controls</th>
</tr>
<% domains.each do |domain| %>
<tr>
<td><%= link_to domain.name, domain %></td>
<td>
<% if domain.reverse? %>
<%= abbr_glyph('chevron-left', 'Reverse') %>
<% else %>
<%= abbr_glyph('chevron-right', 'Forward') %>
<% end %>
<% if domain.slave? %>
<%= abbr_glyph('link', 'Slave') %>
<% end %>
</td>
<td><%= link_to_edit edit_domain_path(domain) %></td>
<td><%= link_to_destroy domain, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<p>
- <%= link_to 'Add Domain', new_domain_path, class: 'btn btn-primary' %>
+ <% if current_user.memberships.any? %>
+ <%= link_to 'Add Domain', new_domain_path, class: 'btn btn-primary' %>
+ <% else %>
+ <%= link_to 'Add Domain', new_domain_path, class: 'btn btn-primary disabled' %>
+ <% end %>
</p>
Event Timeline
Log In to Comment