Ajout ChantDoc.lien (alternative à fichier)
This commit is contained in:
		
							parent
							
								
									75f024feaf
								
							
						
					
					
						commit
						bbea558cc2
					
				
					 7 changed files with 60 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -11,7 +11,13 @@
 | 
			
		|||
            {% for subform in form.formset %}
 | 
			
		||||
            <div class="card text-bg-secondary mt-2">
 | 
			
		||||
              <div class="card-body">
 | 
			
		||||
                {{ subform }}
 | 
			
		||||
                {% if subform.fichier %}{{ subform.fichier.as_field_group }}
 | 
			
		||||
                {% elif subform.instance.fichier %}
 | 
			
		||||
                    <div>Fichier: <a href="{{ subform.instance.fichier.url }}">{{ subform.instance.fichier }}</a></div>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
                {{ subform.lien.as_field_group }}
 | 
			
		||||
                {{ subform.titre.as_field_group }}
 | 
			
		||||
                {{ subform.DELETE.as_field_group }}
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,9 +11,16 @@
 | 
			
		|||
            <td>{{ chant.numero }}</td>
 | 
			
		||||
            <td>{{ chant.titre }}</td>
 | 
			
		||||
            <td>{% for doc in chant.chantdoc_set.all %}
 | 
			
		||||
                {% if doc.fichier %}
 | 
			
		||||
                <a href="{{ doc.fichier.url }}">
 | 
			
		||||
                    <img src="{{ doc.fichier.path|icon_url }}" title="{{ doc.titre }}" data-bs-toggle="tooltip">
 | 
			
		||||
                </a>{% endfor %}
 | 
			
		||||
                    <img src="{{ doc.fichier.path|icon_url }}" title="{{ doc.titre }}" class="icon" data-bs-toggle="tooltip">
 | 
			
		||||
                </a>
 | 
			
		||||
                {% else %}
 | 
			
		||||
                <a href="{{ doc.lien }}">
 | 
			
		||||
                    <img src="{% static 'img/web-icon.svg' %}" title="{{ doc.titre }}" class="icon" data-bs-toggle="tooltip">
 | 
			
		||||
                </a>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>{{ chant.particularite }}</td>
 | 
			
		||||
            {% if perms.beesgospel.change_chant %}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue