add site delete tab on account if only site

This commit is contained in:
Kyle Drake 2016-10-18 23:55:55 -05:00
parent 55a245c290
commit a2828bed16
3 changed files with 10 additions and 6 deletions

View file

@ -31,6 +31,9 @@
<% if current_site.stripe_paying_supporter? %>
<li><a href="#billing" data-toggle="tab">Change Card</a></li>
<% end %>
<% if parent_site == current_site && parent_site.children_dataset.count == 0 %>
<li><a href="#delete" data-toggle="tab">Delete Account</a></li>
<% end %>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="sites">
@ -50,6 +53,11 @@
<%== erb :'settings/account/billing' %>
</div>
<% end %>
<% if parent_site == current_site && parent_site.children_dataset.count == 0 %>
<div class="tab-pane" id="delete">
<%== erb :'settings/site/delete' %>
</div>
<% end %>
</div>
</div>
</section>

View file

@ -10,7 +10,7 @@
<% end %>
</td>
<td <% if i == 0 %>style="border-top: 0px"<% end %>>
<a href="/settings/<%= site.username %>">Settings</a>
<a href="/settings/<%= site.username %>">Manage Site Settings</a>
</td>
</tr>
<% end %>

View file

@ -14,10 +14,6 @@
This will delete your site <strong><%= @site.username %> (<%= @site.host %>)</strong>.
</li>
<li>
If you just want to rename your site, use the <strong>Change Site (User) Name</strong> tab instead.
</li>
<% if @site.parent? %>
<li>
<strong style="color: red;">You will not be able to use your email address to register a new Neocities account after deleting this one.</strong>
@ -40,7 +36,7 @@
<% if @site.parent? %>
<p>
<label for="deleted_reason">We're sorry to see you go, but no worries, we're understanding. What's the reason you're deleting your site? We'd love to know so we can make sure we're doing a good job, and improve Neocities in the future. You can <a href="https://neocities.org/contact">contact us</a> too, if you'd like to see if it's something we can fix first.</label>
<label for="deleted_reason">We're sorry to see you go. What's the reason you're deleting your site?</label>
<textarea name="deleted_reason"></textarea>
</p>
<% end %>