neocities/views/settings/account/sites.erb
2014-10-07 10:09:16 -07:00

37 lines
No EOL
1.1 KiB
Text

<h2>Your Sites</h2>
<% if current_site.children_dataset.count == 0 %>
<h6>No other sites are currently linked to this account.</h6>
<% else %>
<table class="table">
<% current_site.owner.account_sites.each do |site| %>
<tr>
<td>
<a href="//<%= site.host %>" target="_blank"><%= site.title %></a>
<% if site.parent? %>
<strong>(parent account)</strong>
<% end %>
</td>
<td>
<a href="/settings/<%= site.username %>">Settings</a>
</td>
</tr>
<% end %>
</table>
<% end %>
<h3>Create New Site</h3>
<p>You can now create new sites that are linked to this account! Sites will share the free space you have available. You have <strong><%= Site::CHILD_SITES_MAX - current_site.children_dataset.count %></strong> new sites remaining.</p>
<form action="/settings/create_child" method="POST">
<%== csrf_token_input_html %>
<p>Site Name:</p>
<input name="username" type="text">
<div>
<input class="btn-Action" type="submit" value="Create New Site">
</div>
</form>