neocities/views/settings/account/sites.erb
2016-10-18 12:47:58 -05:00

36 lines
1.1 KiB
Text

<h2>Your Sites</h2>
<table class="table">
<% current_site.account_sites_dataset.each_with_index do |site,i| %>
<tr>
<td <% if i == 0 %>style="border-top: 0px"<% end %>>
<a href="//<%= site.host %>" target="_blank"><%= site.username %></a>
<% if site.parent? %>
<strong>(parent account)</strong>
<% end %>
</td>
<td <% if i == 0 %>style="border-top: 0px"<% end %>>
<a href="/settings/<%= site.username %>">Settings</a>
</td>
</tr>
<% end %>
</table>
<h3>Create New Site</h3>
<% if current_site.plan_feature(:unlimited_site_creation) %>
<p>You can now create new sites that are linked to this account! All of your sites will share the free space you have available.</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>
<% else %>
<p>Multiple site creation is only available for supporter accounts. <a href="/supporter">Upgrade now</a>!</p>
<% end %>