Skip to content

Commit

Permalink
Updated domain dropdown menu to reflect domain expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaddalena committed Jul 5, 2023
1 parent cd4cea6 commit a5b6335
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ghostwriter/shepherd/templates/shepherd/domain_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,20 @@
<div class="bar3"></div>
</div>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="domain-dropdown-btn">
<a class="dropdown-item icon edit-icon" href="{% url 'shepherd:domain_update' domain.id %}">Edit</a>
{% if domain.is_expired %}
<a class="dropdown-item icon skull-icon" href="#">Domain Expired</a>
{% else %}
{% if domain.is_expired is False %}
<a class="dropdown-item icon edit-icon" href="{% url 'shepherd:domain_update' domain.id %}">Edit</a>
{% if domain.domain_status.domain_status == "Available" or domain.domain_status.domain_status == "Burned" %}
<a class="dropdown-item icon checkout-icon" href="{% url 'shepherd:checkout' domain.id %}">Checkout Domain</a>
{% else %}
<a class="dropdown-item icon block-icon" href="#">Domain Unavailable</a>
{% endif %}
{% endif %}
{% if domain.health_status.health_status == "Healthy" %}
<a class="dropdown-item icon burn-icon" href="{% url 'shepherd:burn' domain.id %}">Mark Burned</a>
{% if domain.health_status.health_status == "Healthy" %}
<a class="dropdown-item icon burn-icon" href="{% url 'shepherd:burn' domain.id %}">Mark Burned</a>
{% endif %}
{% else %}
{% if request.user.role in 'manager, admin' %}
<a class="dropdown-item icon edit-icon" href="{% url 'shepherd:domain_update' domain.id %}">Edit</a>
{% endif %}
{% endif %}
<a class="dropdown-item icon trash-icon" href="{% url 'shepherd:domain_delete' domain.id %}">Delete</a>
</div>
Expand Down Expand Up @@ -64,7 +66,7 @@ <h4>Domain Details</h4>

{% if domain.is_expired %}
<div class="alert alert-danger" role="alert">
Domain is <strong>Expired</strong>, so this data is now read-only.
This domain is <strong>Expired</strong>, so it cannot be checked out, and the data is now read-only. Managers and admins can edit this domain to update the expiration date.
</div>
{% endif %}

Expand Down

0 comments on commit a5b6335

Please sign in to comment.