feat(templates): Add 'Last post by' to the list of threads
This commit is contained in:
		
							parent
							
								
									09a97d46ea
								
							
						
					
					
						commit
						ee855d8b67
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -58,6 +58,7 @@ struct IndexThread {
 | 
			
		|||
    sticky: bool,
 | 
			
		||||
    posted: FormattedDate,
 | 
			
		||||
    author_name: String,
 | 
			
		||||
    post_author: String,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl Handler<IndexPage> for Renderer {
 | 
			
		||||
| 
						 | 
				
			
			@ -72,6 +73,7 @@ impl Handler<IndexPage> for Renderer {
 | 
			
		|||
                sticky: thread.sticky,
 | 
			
		||||
                posted: thread.posted.into(),
 | 
			
		||||
                author_name: thread.thread_author,
 | 
			
		||||
                post_author: thread.post_author,
 | 
			
		||||
            })
 | 
			
		||||
            .collect();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,10 @@
 | 
			
		|||
                <h5 class="mb-1">{% if thread.sticky %}<span class="badge badge-light">Sticky</span> {% endif %}{{ thread.title | safe }}</h5>
 | 
			
		||||
                <small class="{% if thread.sticky %}text-white{% else %}text-muted{% endif %}">{{ thread.posted }}</small>
 | 
			
		||||
              </div>
 | 
			
		||||
              <p class="mb-1">Created by {{ thread.author_name }}</p>
 | 
			
		||||
              <div class="d-flex justify-content-between">
 | 
			
		||||
                <p class="mb-1">Created by {{ thread.author_name }}</p>
 | 
			
		||||
                <small>Last post by {{ thread.post_author }}</small>
 | 
			
		||||
              </div>
 | 
			
		||||
            </a>
 | 
			
		||||
            {%- endfor %}
 | 
			
		||||
          </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue