Added Slot.content_override
Slots can now be controlled through content_override if custom content is needed in non-talk slots.
This commit is contained in:
		
							parent
							
								
									06ea84331c
								
							
						
					
					
						commit
						d7ac510555
					
				
					 3 changed files with 11 additions and 2 deletions
				
			
		|  | @ -48,6 +48,7 @@ class Slot(models.Model): | ||||||
|     kind = models.ForeignKey(SlotKind) |     kind = models.ForeignKey(SlotKind) | ||||||
|     start = models.TimeField() |     start = models.TimeField() | ||||||
|     end = models.TimeField() |     end = models.TimeField() | ||||||
|  |     content_override = models.TextField(blank=True) | ||||||
|      |      | ||||||
|     def assign(self, content): |     def assign(self, content): | ||||||
|         """ |         """ | ||||||
|  |  | ||||||
|  | @ -17,9 +17,13 @@ | ||||||
|                             <div class="title"><a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></div> |                             <div class="title"><a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></div> | ||||||
|                             <div class="speaker">{{ slot.content.speaker }}</div> |                             <div class="speaker">{{ slot.content.speaker }}</div> | ||||||
|                         {% endif %} |                         {% endif %} | ||||||
|  |                     {% else %} | ||||||
|  |                         {% if slot.content_override %} | ||||||
|  |                             {{ slot.content_override|safe }} | ||||||
|                         {% else %} |                         {% else %} | ||||||
|                             {{ slot.kind.label }} |                             {{ slot.kind.label }} | ||||||
|                         {% endif %} |                         {% endif %} | ||||||
|  |                     {% endif %} | ||||||
|                 </td> |                 </td> | ||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tr> |         </tr> | ||||||
|  |  | ||||||
|  | @ -16,9 +16,13 @@ | ||||||
|                             <div class="title"><a href="{% url schedule_presentation_detail slot.content.pk %}">{{ slot.content.title }}</a></div> |                             <div class="title"><a href="{% url schedule_presentation_detail slot.content.pk %}">{{ slot.content.title }}</a></div> | ||||||
|                             <div class="speaker">{{ slot.content.speaker }}</div> |                             <div class="speaker">{{ slot.content.speaker }}</div> | ||||||
|                         {% endif %} |                         {% endif %} | ||||||
|  |                     {% else %} | ||||||
|  |                         {% if slot.content_override %} | ||||||
|  |                             {{ slot.content_override|safe }} | ||||||
|                         {% else %} |                         {% else %} | ||||||
|                             {{ slot.kind.label }} |                             {{ slot.kind.label }} | ||||||
|                         {% endif %} |                         {% endif %} | ||||||
|  |                     {% endif %} | ||||||
|                 </td> |                 </td> | ||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </tr> |         </tr> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Brian Rosner
						Brian Rosner