Make proposal-detail more friendly to read
This commit is contained in:
		
							parent
							
								
									3c5a14c97b
								
							
						
					
					
						commit
						8cf348acb5
					
				
					 2 changed files with 178 additions and 95 deletions
				
			
		|  | @ -1,116 +1,194 @@ | |||
| {% load i18n %} | ||||
| {% load pyconau2017_tags %} | ||||
| 
 | ||||
|     <h4>{% trans "Submitted by" %}</h4> | ||||
|     <p>{{ proposal.speaker }} <{{ proposal.speaker.email }}></p> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Submitted by</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         <p>{{ proposal.speaker }} <{{ proposal.speaker.email }}></p> | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Proposal Type" %}</h4> | ||||
|     <p>{{ proposal.kind.name|capfirst }}</p> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Proposal Type</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         <p>{{ proposal.kind.name|capfirst }}</p> | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Target Audience" %}</h4> | ||||
|     <p>{{ proposal.get_target_audience_display }} </p> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Target Audience</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         <p>{{ proposal.get_target_audience_display }} </p> | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     {% if proposal.additional_speakers.all %} | ||||
|         <h4>{% trans "Additional Speakers" %}</h4> | ||||
|         <ul> | ||||
|             {% for speaker in proposal.additional_speakers.all %} | ||||
|                 <li> | ||||
|                     {% if speaker.user %} | ||||
|                         <strong>{{ speaker.name }}</strong> <{{ speaker.email }}> | ||||
|                     {% else %} | ||||
|                         {{ speaker.email }} ({% trans "Invitation Sent" %}) | ||||
|                     {% endif %} | ||||
|                 </li> | ||||
|             {% endfor %} | ||||
|         </ul> | ||||
|         <p></p> | ||||
|       <div> | ||||
|         <label class="col-sm-2 col-lg-2">Additional Speakers</label> | ||||
|         <div class="col-sm-10 col-lg-10"> | ||||
|           <table class="table"> | ||||
|             <thead> | ||||
|               <tr> | ||||
|                 <th>Name</th> | ||||
|                 <th>Email</th> | ||||
|                 <th>Status</th> | ||||
|               </tr> | ||||
|             </thead> | ||||
|             <tbody> | ||||
|               {% for speaker in proposal.additional_speakers.all %} | ||||
|                 <tr> | ||||
|                   {% if speaker.user %} | ||||
|                     <td>{{ speaker.name }}</td> | ||||
|                     <td>{{ speaker.email }}</td> | ||||
|                     <td>Joined</td> | ||||
|                   {% else %} | ||||
|                     <td>Unknown</td> | ||||
|                     <td>{{ speaker.email }}</td> | ||||
|                     <td>Invitation Sent</td> | ||||
|                   {% endif %} | ||||
|                </tr> | ||||
|               {% endfor %} | ||||
|             </tbody> | ||||
|           </table> | ||||
|         </div> | ||||
|       </div> | ||||
|       <p></p> | ||||
|     {% endif %} | ||||
| 
 | ||||
|     <h4>{% trans "Abstract" %}</h4> | ||||
|     <div class="abstract monospace-text">{{ proposal.abstract_html|safe }} </div> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Abstract</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         <div class="abstract monospace-text well">{{ proposal.abstract_html|safe }} </div> | ||||
|         <p></p> | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Private Abstract" %}</h4> | ||||
|     <div class="private_abstract monospace-text">{{ proposal.private_abstract_html|safe }} </div> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Private Abstract</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         <div class="private_abstract monospace-text well">{{ proposal.private_abstract_html|safe }} </div> | ||||
|         <p></p> | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Project" %}</h4> | ||||
|     <p>{{ proposal.project|safe }} </p> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Project</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         {% if proposal.project %} | ||||
|           <p>{{ proposal.project|safe }} </p> | ||||
|         {% else %} | ||||
|           <p><b>None Provided</b></p> | ||||
|         {% endif %} | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Project URL" %}</h4> | ||||
|     <p><a href="{{ proposal.project_url|safe }}">{{ proposal.project_url|safe }}</a> </p> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Project URL</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         {% if proposal.project_url %} | ||||
|           <p><a href="{{ proposal.project_url|safe }}">{{ proposal.project_url|safe }}</a> </p> | ||||
|         {% else %} | ||||
|           <p><b>None Provided</b></p> | ||||
|         {% endif %} | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Video URL" %}</h4> | ||||
|     <p><a href="{{ proposal.video_url|safe }}">{{ proposal.video_url|safe }}</a> </p> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Video URL</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         {% if proposal.video_url %} | ||||
|           <p><a href="{{ proposal.video_url|safe }}">{{ proposal.video_url|safe }}</a> </p> | ||||
|         {% else %} | ||||
|           <p><b>None Provided</b></p> | ||||
|         {% endif %} | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Special Requirements" %}</h4> | ||||
|     <div class="special_requirements monospace-text">{{ proposal.technical_requirements_html|safe }}</div> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Special Requirements</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         {% if proposal.technical_requirements_html %} | ||||
|           <div class="special_requirements monospace-text">{{ proposal.technical_requirements_html|safe }}</div> | ||||
|         {% else %} | ||||
|           <div class="special_requirements monospace-text"><b>No Special Talk Requirements Requested</b></div> | ||||
|         {% endif %} | ||||
|       </div> | ||||
|         | ||||
|     </div> | ||||
|     <br/> | ||||
| 
 | ||||
|     {% for speaker in proposal.speakers %} | ||||
|       <h4>{% trans "Speaker:" %} {{ speaker.name }}</h4> | ||||
|       <h5>{% trans "Biography" %}</h5> | ||||
| 
 | ||||
|       <div class="biography monospace-text">{{ speaker.biography_html|safe }} </div> | ||||
| 
 | ||||
|       <h5>{% trans "Experience" %}</h5> | ||||
|       <div class="biography monospace-text">{{ speaker.experience_html|safe }} </div> | ||||
|       {% if speaker.name %} | ||||
|         <div class="panel panel-default"> | ||||
|           <div class="panel-heading"> | ||||
|             <h3 class="panel-title">Speaker: {{ speaker.name }}</h3> | ||||
|           </div> | ||||
|           <div class="panel-body"> | ||||
|             <div> | ||||
|               <label class="col-sm-2 col-lg-2">Biography</label> | ||||
|               <div class="col-sm-10 col-lg-10 well monospace-text">{{ speaker.biography_html|safe }} </div> | ||||
|             </div> | ||||
|             <div> | ||||
|               <label class="col-sm-2 col-lg-2">Experience</label> | ||||
|               <div class="col-sm-10 col-lg-10 well monospace-text">{{ speaker.experience_html|safe }} </div> | ||||
|             </div> | ||||
|             {% if speaker.accessibility_html %} | ||||
|               <div> | ||||
|                 <label class="col-sm-2 col-lg-2">Accessibility Requirements</label> | ||||
|                 <div class="col-sm-10 col-lg-10 well monospace-text">{{ speaker.accessibility_html|safe }} </div> | ||||
|               </div> | ||||
|             {% endif %} | ||||
|           </div> | ||||
|         </div> | ||||
|       {% endif %} | ||||
|     {% endfor %} | ||||
| 
 | ||||
|     {% can_manage proposal as can_manage_proposal %} | ||||
|     {% if can_manage_proposal or request.user.speaker_profile in proposal.speakers %} | ||||
| 
 | ||||
|       <h4>{% trans "Assistance required?" %}</h4> | ||||
|       <div> | ||||
|         <label class="col-sm-2 col-lg-2">Travel Assistance Required</label> | ||||
|         <div class="col-sm-10 col-lg-10"> | ||||
|           <table class="table"> | ||||
|             <thead> | ||||
|               <tr> | ||||
|                 <th>Name</th> | ||||
|                 <th>Travel</th> | ||||
|                 <th>Accomodation</th> | ||||
|               </tr> | ||||
|             </thead> | ||||
|             <tbody> | ||||
|               {% for speaker in proposal.speakers %} | ||||
|                 <tr> | ||||
|                   {% if speaker.user %} | ||||
|                     <td>{{ speaker.name }}</td> | ||||
|                     <td>{{ speaker.travel_assistance }}</td> | ||||
|                     <td>{{ speaker.accommodation_assistance }}</td> | ||||
|                   {% else %} | ||||
|                     <td><b>Unconfirmed co-presenter</b></td> | ||||
|                     <td><b>Unknown</b></td> | ||||
|                     <td><b>Unknown</b></td> | ||||
|                   {% endif %} | ||||
|                 </tr> | ||||
|               {% endfor %} | ||||
|             </tbody> | ||||
|           </table> | ||||
|         </div> | ||||
|       </div> | ||||
|       <br /> | ||||
|       <table> | ||||
|         <tr> | ||||
|           <th></th> | ||||
|           <th>{% trans "Travel" %}</th> | ||||
|           <th>{% trans "Accommodation" %}</th> | ||||
|         </tr> | ||||
|         {% for speaker in proposal.speakers %} | ||||
|           <tr> | ||||
|             <td>{{ speaker.name }}</td> | ||||
|             <td>{{ speaker.travel_assistance }}</td> | ||||
|             <td>{{ speaker.accommodation_assistance }}</td> | ||||
|           </tr> | ||||
|         {% endfor %} | ||||
|       </table> | ||||
|       <br /> | ||||
| 
 | ||||
|       {% if proposal.speaker.accessibility_html %} | ||||
|         <h4>{% trans "Speaker Accessibility Requirements" %}</h4> | ||||
|         {% for speaker in proposal.speakers %} | ||||
|           {% if speaker.accessibility_html %} | ||||
|             <h5>{{ speaker.name }}</h5> | ||||
|             <div class="biography monospace-text">{{ speaker.accessibility_html|safe }} </div> | ||||
|           {% endif %} | ||||
|         {% endfor %} | ||||
|       {% endif %} | ||||
| 
 | ||||
|     {% endif %} | ||||
| 
 | ||||
| 
 | ||||
|     <h4>{% trans "Documents" %}</h4> | ||||
|     <div> | ||||
|         {% if proposal.supporting_documents.exists %} | ||||
|             <table class="table table-striped"> | ||||
|                 {% for document in proposal.supporting_documents.all %} | ||||
|                     <tr> | ||||
|                         <td><a href="{{ document.download_url }}">{{ document.description }}</a></td> | ||||
|                         <td> | ||||
|                         <form class="form-horizontal" style="margin: 0;" method="post" action="{% url "proposal_document_delete" document.pk %}"> | ||||
|                             {% csrf_token %} | ||||
|                             <button type="submit" class="btn btn-xs">delete</button> | ||||
|                         </form> | ||||
|                     </td> | ||||
|                     </tr> | ||||
|                 {% endfor %} | ||||
|             </table> | ||||
|         {% else %} | ||||
|             <p>No supporting documents attached to this proposal.</p> | ||||
|         {% endif %} | ||||
|       <label class="col-sm-2 col-lg-2">Recording Release</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         <p>{{ proposal.recording_release }} </p> | ||||
|       </div> | ||||
|         | ||||
|     </div> | ||||
| 
 | ||||
|     <h4>{% trans "Recording Release" %}</h4> | ||||
|     <p>{{ proposal.recording_release }} </p> | ||||
| 
 | ||||
|     <h4>{% trans "Materials Release" %}</h4> | ||||
|     <p>{{ proposal.materials_release }} </p> | ||||
|     <div> | ||||
|       <label class="col-sm-2 col-lg-2">Materials Release</label> | ||||
|       <div class="col-sm-10 col-lg-10"> | ||||
|         <p>{{ proposal.materials_release }} </p> | ||||
|       </div> | ||||
|         | ||||
|     </div> | ||||
|  |  | |||
|  | @ -19,8 +19,9 @@ | |||
|         <div class="btn-group"> | ||||
|           {% if not proposal.cancelled %} | ||||
|             {% if request.user == proposal.speaker.user %} | ||||
|               <a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-default">{% trans "Edit this proposal" %}</a> | ||||
|               <a href="{% url "proposal_cancel" proposal.pk %}" class="btn btn-default">{% trans "Cancel this proposal" %}</a> | ||||
|               <a class="btn btn-lg btn-primary" href="{% url "proposal_edit" proposal.pk %}">{% trans "Edit this proposal" %}</a> | ||||
|               <a class="btn btn-lg btn-success" role="button" href="{% url "proposal_speaker_manage" proposal.id %}">Manage Additional Speakers</a> | ||||
|               <a class="btn btn-lg btn-danger" href="{% url "proposal_cancel" proposal.pk %}">{% trans "Cancel this proposal" %}</a> | ||||
|             {% else %} | ||||
|               <a href="{% url "proposal_leave" proposal.pk %}" class="btn btn-default">{% trans "Remove me from this proposal" %}</a> | ||||
|             {% endif %} | ||||
|  | @ -54,9 +55,13 @@ | |||
|       <div class="tab-pane" id="reviewer-feedback"> | ||||
|         <h3>{% trans 'Conversation with Reviewers' %}</h3> | ||||
|         {% for message in proposal.messages.all %} | ||||
|           <div class="review-box"> | ||||
|             <div class="comment monospace-text"><em>{{ message.message|safe }}</em></div> | ||||
|             <div class="dateline"><b>{{ message.user.username }}</b> {{ message.submitted_at|timesince }} ago</div> | ||||
|           <div class="panel panel-default"> | ||||
|             <div class="panel-body"> | ||||
|               <div class="comment monospace-text"><em>{{ message.message|safe }}</em></div> | ||||
|             </div> | ||||
|             <div class="panel-heading"> | ||||
|               <div><b>{{ message.user.username }}</b> {{ message.submitted_at|timesince }} ago</div> | ||||
|             </div> | ||||
|           </div> | ||||
|           <br /> | ||||
|         {% endfor %} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Sachi King
						Sachi King