Commits

Anonymous committed 6d3e259

Added now labels

Comments (0)

Files changed (3)

rentalerts/apps/apartments/templates/apartments/apartment_detail.html

             </tr>
 
             <tr>
+                {% if apartment.available_from %}
                 <td>Available from</td><td><strong>{{ apartment.available_from|date:"d/m/Y" }}{% if apartment.available_to %} - {{ apartment.available_to|date:"d/m/y" }}{% endif %}</strong></td>
+                {% else %}
+                    <span class="label label-important">Now</span>
+                {% endif %}
             </tr>
 
             <tr>

rentalerts/apps/apartments/templates/apartments/apartment_list.html

         <td><b><a href="{{ apartment.get_absolute_url }}">{{ apartment.get_full_address }}</a></b></td>
         <td>{{ apartment.get_num_rooms_display }}</td>
         <td>{{ apartment.rent_pcm }} / mo</td>
+        {% if apartment.available_from %}
         <td>{{ apartment.available_from|date:"F Y" }}</td>
+        {% else %}
+            <td>
+                <span class="label label-important">Now</span>
+            </td>
+    {% endif %}
     </tr>
     {% empty %}
     <tr><td colspan="4">

rentalerts/apps/site/templates/dashboard.html

                 <td><b><a href="{{ apartment.get_absolute_url }}">{{ apartment.get_full_address }}</a></b></td>
                 <td>{{ apartment.get_num_rooms_display }}</td>
                 <td>{{ apartment.rent_pcm }} / mo</td>
+                {% if apartment.available_from %}
                 <td>{{ apartment.available_from|date:"F Y" }}</td>
+                {% else %}
+                <td>
+                    <span class="label label-important">Now</span>
+                </td>
+                {% endif %}
             </tr>
             {% empty %}
             <tr>