| 
									
										
										
										
											2017-04-13 15:09:08 -04:00
										 |  |  | <tr class="devicebay"> | 
					
						
							| 
									
										
										
										
											2017-11-03 16:58:56 -04:00
										 |  |  |     {% if perms.dcim.change_devicebay or perms.dcim.delete_devicebay %} | 
					
						
							| 
									
										
										
										
											2016-07-26 10:14:51 -04:00
										 |  |  |         <td class="pk"> | 
					
						
							|  |  |  |             <input name="pk" type="checkbox" value="{{ devicebay.pk }}" /> | 
					
						
							|  |  |  |         </td> | 
					
						
							|  |  |  |     {% endif %} | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |     <td> | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |         <i class="fa fa-fw fa-{% if devicebay.installed_device %}dot-circle-o{% else %}circle-o{% endif %}"></i> {{ devicebay.name }} | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |     </td> | 
					
						
							| 
									
										
										
										
											2016-07-05 13:42:14 -04:00
										 |  |  |     {% if devicebay.installed_device %} | 
					
						
							| 
									
										
										
										
											2018-07-10 20:40:48 -05:00
										 |  |  |         <td> | 
					
						
							|  |  |  |             <span class="label label-{{ devicebay.installed_device.get_status_class }}">{{ devicebay.installed_device.get_status_display }}</span> | 
					
						
							|  |  |  |         </td> | 
					
						
							| 
									
										
										
										
											2016-07-05 13:42:14 -04:00
										 |  |  |         <td> | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |             <a href="{% url 'dcim:device' pk=devicebay.installed_device.pk %}">{{ devicebay.installed_device }}</a> | 
					
						
							| 
									
										
										
										
											2016-07-05 13:42:14 -04:00
										 |  |  |         </td> | 
					
						
							|  |  |  |         <td> | 
					
						
							| 
									
										
										
										
											2016-12-08 09:59:21 -05:00
										 |  |  |             <span>{{ devicebay.installed_device.device_type.full_name }}</span> | 
					
						
							| 
									
										
										
										
											2016-07-05 13:42:14 -04:00
										 |  |  |         </td> | 
					
						
							|  |  |  |     {% else %} | 
					
						
							| 
									
										
										
										
											2018-07-10 20:40:48 -05:00
										 |  |  |         <td></td> | 
					
						
							| 
									
										
										
										
											2016-07-05 13:42:14 -04:00
										 |  |  |         <td colspan="2"> | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |             <span class="text-muted">Vacant</span> | 
					
						
							| 
									
										
										
										
											2016-07-05 13:42:14 -04:00
										 |  |  |         </td> | 
					
						
							|  |  |  |     {% endif %} | 
					
						
							| 
									
										
										
										
											2017-12-21 13:29:02 -05:00
										 |  |  |     <td class="text-right"> | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |         {% if perms.dcim.change_devicebay %} | 
					
						
							|  |  |  |             {% if devicebay.installed_device %} | 
					
						
							|  |  |  |                 <a href="{% url 'dcim:devicebay_depopulate' pk=devicebay.pk %}" class="btn btn-danger btn-xs"> | 
					
						
							|  |  |  |                     <i class="glyphicon glyphicon-remove" aria-hidden="true" title="Remove device"></i> | 
					
						
							|  |  |  |                 </a> | 
					
						
							|  |  |  |             {% else %} | 
					
						
							|  |  |  |                 <a href="{% url 'dcim:devicebay_populate' pk=devicebay.pk %}" class="btn btn-success btn-xs"> | 
					
						
							|  |  |  |                     <i class="glyphicon glyphicon-plus" aria-hidden="true" title="Install device"></i> | 
					
						
							|  |  |  |                 </a> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							|  |  |  |             <a href="{% url 'dcim:devicebay_edit' pk=devicebay.pk %}" class="btn btn-info btn-xs"> | 
					
						
							|  |  |  |                 <i class="glyphicon glyphicon-pencil" aria-hidden="true" title="Edit device bay"></i> | 
					
						
							|  |  |  |             </a> | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							|  |  |  |         {% if perms.dcim.delete_devicebay %} | 
					
						
							|  |  |  |             {% if devicebay.installed_device %} | 
					
						
							|  |  |  |                 <button class="btn btn-danger btn-xs" disabled="disabled"> | 
					
						
							|  |  |  |                     <i class="glyphicon glyphicon-trash" aria-hidden="true"></i> | 
					
						
							|  |  |  |                 </button> | 
					
						
							|  |  |  |             {% else %} | 
					
						
							| 
									
										
										
										
											2018-02-27 14:59:45 -05:00
										 |  |  |                 <a href="{% url 'dcim:devicebay_delete' pk=devicebay.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs"> | 
					
						
							| 
									
										
										
										
											2016-07-01 17:12:43 -04:00
										 |  |  |                     <i class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete device bay"></i> | 
					
						
							|  |  |  |                 </a> | 
					
						
							|  |  |  |             {% endif %} | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							|  |  |  |     </td> | 
					
						
							|  |  |  | </tr> |