Skip to content

Commit

Permalink
Merge pull request #678 from EsupPortail/develop
Browse files Browse the repository at this point in the history
Develop #3.0.3
  • Loading branch information
ptitloup authored Oct 21, 2022
2 parents e7822cb + 8401a4f commit 8209146
Show file tree
Hide file tree
Showing 146 changed files with 4,816 additions and 3,918 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Le projet et la plateforme qui porte le même nom ont pour but de faciliter la m
* Accédez à toute la documentation (installation, paramétrage etc.) [sur notre wiki](https://www.esup-portail.org/wiki/display/ES/esup-pod "Documentation")

[EN]
## Platform management of video files
## Video file management platform
Created in 2014 at the university of [Lille](https://www.univ-lille.fr/), the POD project has been managed by the [Esup Portail consortium](https://www.esup-portail.org/) and supported by the [Ministry of Higher Education, Research and Innovation](http://www.enseignementsup-recherche.gouv.fr/) since September 2015 .

The project and the platform of the same name are aimed at users of our institutions, by allowing the publication of videos in the fields of research (promotion of platforms, etc.), training (tutorials, distance training, student reports, etc.), institutional life (video of events), offering several days of content.
Expand Down
8 changes: 4 additions & 4 deletions pod/authentication/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class Media:
)
}
js = (
"podfile/js/filewidget.js",
"js/main.js",
"bootstrap/dist/js/bootstrap.min.js",
# "podfile/js/filewidget.js",
# "js/main.js",
# "bootstrap/dist/js/bootstrap.min.js",
)


Expand Down Expand Up @@ -171,7 +171,7 @@ class GroupAdmin(admin.ModelAdmin):
def get_queryset(self, request):
qs = super().get_queryset(request)
if not request.user.is_superuser:
qs = qs.filter(sites=get_current_site(request))
qs = qs.filter(groupsite__sites=get_current_site(request))
return qs

def save_model(self, request, obj, form, change):
Expand Down
10 changes: 5 additions & 5 deletions pod/authentication/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ class Meta(object):

# Create ModelForm based on the Group model.
class GroupAdminForm(forms.ModelForm):
class Meta:
model = Group
fields = "__all__"
exclude = []

# Add the users field.
users = forms.ModelMultipleChoiceField(
queryset=User.objects.all(),
Expand All @@ -68,6 +63,11 @@ class Meta:
label=_("Users"),
)

class Meta:
model = Group
fields = "__all__"
exclude = []

def __init__(self, *args, **kwargs):
# Do the normal form initialisation.
super(GroupAdminForm, self).__init__(*args, **kwargs)
Expand Down
10 changes: 10 additions & 0 deletions pod/authentication/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ class Owner(models.Model):
accessgroups = models.ManyToManyField("authentication.AccessGroup", blank=True)
sites = models.ManyToManyField(Site)

class Meta:
verbose_name = _("Owner")
verbose_name_plural = _("Owners")
ordering = ["user"]

def __str__(self):
if HIDE_USERNAME:
return "%s %s" % (self.user.first_name, self.user.last_name)
Expand Down Expand Up @@ -149,6 +154,11 @@ class GroupSite(models.Model):
group = models.OneToOneField(Group, on_delete=models.CASCADE)
sites = models.ManyToManyField(Site)

class Meta:
verbose_name = _("Group site")
verbose_name_plural = _("Groups site")
ordering = ["group"]


@receiver(post_save, sender=GroupSite)
def default_site_groupsite(sender, instance, created, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions pod/authentication/templates/authentication/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<p><a class="btn btn-primary" role="button" href="{{SHIB_URL }}?target={{ referrer|urlencode }}">{{SHIB_NAME}}</a></p>
{% endif %}
{% if USE_OIDC %}
<p><a class="btn btn-primary" href="{%url 'oidc_authentication_init' %}" title="{{ OIDC_NAME }}">{{OIDC_NAME}}</a></p>
<p><a class="btn btn-primary" href="{%url 'oidc_authentication_init' %}?next={{ referrer|urlencode }}" title="{{ OIDC_NAME }}">{{OIDC_NAME}}</a></p>
{% endif %}
{% if not local_login %}
<p><a class="btn btn-secondary" role="button" href="{% url 'local-login'%}?{% if request.GET.is_iframe %}is_iframe=true&amp;{%endif%}next={{ referrer|urlencode }}">{% trans "Local sign on" %}</a></p>
<p><a class="btn btn-secondary" role="button" href="{% url 'local-login'%}?{% if request.GET.is_iframe %}is_iframe=true&amp;{% endif %}next={{ referrer|urlencode }}">{% trans "Local sign on" %}</a></p>
{% endif %}
</div>

Expand Down
10 changes: 5 additions & 5 deletions pod/authentication/templates/userpicture/userpicture.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<form method="post" action="{% url 'userpicture' %}" id="userpicture_form">
<div class="modal-header">
<h2 class="modal-title" id="exampleModalLabel">{% trans "Change your picture" %}</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>
</div>
<div class="modal-body">
{% if messages %}
<div id="base-message-alert">
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>

</div>
{% endfor %}
Expand All @@ -29,13 +29,13 @@ <h2 class="modal-title" id="exampleModalLabel">{% trans "Change your picture" %}
{% endfor %}
{% for field in frontOwnerForm.visible_fields %}
{% spaceless %}
<div class="form-group" >
<div class="form-group">
{{ field.errors }}
{{ field }}
{% if field.help_text %}
<small id="{{field.id_for_label}}Help" class="form-text text-muted">{{ field.help_text|safe }}</small>
<small id="{{field.id_for_label}}Help" class="form-text">{{ field.help_text|safe }}</small>
{% endif %}
{% if field.field.required %}<div class="invalid-feedback">{% trans "Please provide a valid value for this field" %}.</div>{%endif%}
{% if field.field.required %}<div class="invalid-feedback">{% trans "Please provide a valid value for this field." %}</div>{% endif %}
</div>
{% endspaceless %}
{% endfor %}
Expand Down
6 changes: 3 additions & 3 deletions pod/bbb/templates/bbb/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
</a>
{% endif %}
{% if record.encoding_step == 1 %}
<small class="form-text text-muted">{% trans "Waiting for encoding"%}</small>
<small class="form-text">{% trans "Waiting for encoding"%}</small>
{% endif %}
{% if record.encoding_step == 2 %}
<small class="form-text text-muted">{% trans "Encoding in progress"%}</small>
<small class="form-text">{% trans "Encoding in progress"%}</small>
{% endif %}
{% if record.encoding_step == 3 %}
<small class="form-text text-muted">
<small class="form-text">
{% trans "Already published"%}
{% if request.user != record.encoded_by %}
{% trans "by"%} {{ record.encoded_by.first_name }} {{ record.encoded_by.last_name }} ({{ record.encoded_by.email }})
Expand Down
6 changes: 3 additions & 3 deletions pod/bbb/templates/bbb/list_meeting.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h4>{% trans "No record found"%}</h4>
<h4>{% blocktrans count counter=records.paginator.count %}{{ counter }} record found{% plural %}{{ counter }} records found{% endblocktrans %}</h4>
{% trans "This is the list of the recorded BigBlueButton sessions for which you were moderator. This module allows you to create a video from a BigBlueButton presentation." %}<br/>
{% trans "Shortly after the presentation is published, the corresponding video will appear in your videos." %}<br/>
<small class="form-text text-muted">
<small class="form-text">
<i>
{% trans "Please note: a BigBlueButton presentation can be encoded by another moderator." %}
{% trans "If such a case occurs, this information will be displayed directly in the list. You can then contact this user directly to ask him/her to share the video with you, or even to put you as additional owner of the video." %}
Expand All @@ -43,7 +43,7 @@ <h4>{% blocktrans count counter=records.paginator.count %}{{ counter }} record f
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title" id="exampleModalLabel">{% trans "BigBlueButton presentation preview" %}</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>
</div>
<div class="modal-body">
<center>
Expand All @@ -57,7 +57,7 @@ <h2 class="modal-title" id="exampleModalLabel">{% trans "BigBlueButton presentat
</div>
</div>

<small class="form-text text-muted"><i>{% trans "Please note: this page refreshes automatically every 30 seconds." %}</i></small>
<small class="form-text"><i>{% trans "Please note: this page refreshes automatically every 30 seconds." %}</i></small>

{% endblock page_content %}

Expand Down
8 changes: 4 additions & 4 deletions pod/bbb/templates/bbb/live_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
</div>
<footer class="card-footer p-0 m-1">
{% if not record.live %}
<small class="form-text text-muted">{% trans "Live not published"%}</small>
<small class="form-text">{% trans "Live not published"%}</small>
{% else %}
{% if record.live.status == 0 %}
<small class="form-text text-muted">{% trans "Live not already started"%}</small>
<small class="form-text">{% trans "Live not already started"%}</small>
{% endif %}
{% if record.live.status == 1 %}
<small class="form-text text-muted">{% trans "Live in progress"%}</small>
<small class="form-text">{% trans "Live in progress"%}</small>
{% endif %}
{% if record.live.status == 2 %}
<small class="form-text text-muted">{% trans "Live stopped"%}</small>
<small class="form-text">{% trans "Live stopped"%}</small>
{% endif %}
{% endif %}
</footer>
Expand Down
2 changes: 1 addition & 1 deletion pod/bbb/templates/bbb/live_list_meeting.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h4>{% blocktrans count counter=records.paginator.count %}{{ counter }} BigBlueB
{% include "bbb/live_record_list.html" %}
{% endif %}

<small class="form-text text-muted"><i>{% trans "Please note: this page refreshes automatically every 30 seconds." %}</i></small>
<small class="form-text"><i>{% trans "Please note: this page refreshes automatically every 30 seconds." %}</i></small>
{% endblock page_content %}

{% block collapse_page_aside %}
Expand Down
12 changes: 6 additions & 6 deletions pod/bbb/templates/bbb/live_publish_meeting.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
body {
background-color: {{form.instance.color}};
}
{%endif%}
{% endif %}
</style>
{% endblock page_extra_head %}

Expand Down Expand Up @@ -55,9 +55,9 @@ <h3>{% trans "Are you sure you want to perform a BigBlueButton live?" %}</h3>
{% endif %}
{% for field in form.visible_fields %}
{% spaceless %}
<div class="{% if "description_" in field.name or "title_" in field.name %}collapse hide{% else %}{% endif %}{% if "description_" in field.name %} description{%endif%}{% if "title_" in field.name %} title{%endif%}">
<div class="{% if "description_" in field.name or "title_" in field.name %}collapse hide{% else %}{% endif %}{% if "description_" in field.name %} description{% endif %}{% if "title_" in field.name %} title{% endif %}">
<div class="list-group-item">
<div class="{% if field.name == "owners" or field.name == "users" %}form-row {%endif%}form-group {% if field.field.required %}form-group-required {%endif%}" >
<div class="{% if field.name == "owners" or field.name == "users" %}form-row {% endif %}form-group {% if field.field.required %}form-group-required {% endif %}" >
{{ field.errors }}
{% if "form-check-input" in field.field.widget.attrs.class %}
<div class="form-check">
Expand All @@ -68,16 +68,16 @@ <h3>{% trans "Are you sure you want to perform a BigBlueButton live?" %}</h3>
{{ field }}
{% endif %}
{% if field.help_text %}
<small id="{{field.id_for_label}}Help" class="form-text text-muted">{{ field.help_text|safe }}</small>
<small id="{{field.id_for_label}}Help" class="form-text">{{ field.help_text|safe }}</small>
{% endif %}
{% if field.field.required %}<div class="invalid-feedback">{% trans "Please provide a valid value for this field" %}.</div>{%endif%}
{% if field.field.required %}<div class="invalid-feedback">{% trans "Please provide a valid value for this field." %}</div>{% endif %}
</div>
</div>
</div>
{% endspaceless %}
{% endfor %}
</fieldset>
<small class="form-text text-muted">{% trans 'Please note: shortly after clicking the "Perform a BigBlueButton live" button, the live stream will be available to users on the <i class=\"bi bi-broadcast\"></i> <b>Lives</b> page.' %}</small><br/>
<small class="form-text">{% trans 'Please note: shortly after clicking the "Perform a BigBlueButton live" button, the live stream will be available to users on the <i class=\"bi bi-broadcast\"></i> <b>Lives</b> page.' %}</small><br/>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary">{% trans "Perform a BigBlueButton live" %}</button>
Expand Down
2 changes: 1 addition & 1 deletion pod/bbb/templates/bbb/live_record_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% endfor %}
</div>
{% if records.has_next %}
<a class="infinite-more-link" href="{{ full_path }}{% if '?' in full_path %}&{% else %}?{%endif%}page={{ records.next_page_number }}">{% trans "More" %}</a>
<a class="infinite-more-link" href="{{ full_path }}{% if '?' in full_path %}&{% else %}?{% endif %}page={{ records.next_page_number }}">{% trans "More" %}</a>
{% endif %}
<div class="infinite-loading" style="display: none;">
{% trans "Loading..." %}
Expand Down
12 changes: 6 additions & 6 deletions pod/bbb/templates/bbb/publish_meeting.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
body {
background-color: {{form.instance.color}};
}
{%endif%}
{% endif %}
</style>
{% endblock page_extra_head %}

Expand Down Expand Up @@ -47,9 +47,9 @@ <h3>{% trans "Are you sure you want to publish this BigBlueButton presentation?"
{% endif %}
{% for field in form.visible_fields %}
{% spaceless %}
<div class="{% if "description_" in field.name or "title_" in field.name %}collapse hide{% else %}{% endif %}{% if "description_" in field.name %} description{%endif%}{% if "title_" in field.name %} title{%endif%}">
<div class="{% if "description_" in field.name or "title_" in field.name %}collapse hide{% else %}{% endif %}{% if "description_" in field.name %} description{% endif %}{% if "title_" in field.name %} title{% endif %}">
<div class="list-group-item">
<div class="{% if field.name == "owners" or field.name == "users" %}form-row {%endif%}form-group {% if field.field.required %}form-group-required {%endif%}" >
<div class="{% if field.name == "owners" or field.name == "users" %}form-row {% endif %}form-group {% if field.field.required %}form-group-required {% endif %}" >
{{ field.errors }}
{% if "form-check-input" in field.field.widget.attrs.class %}
<div class="form-check">
Expand All @@ -60,17 +60,17 @@ <h3>{% trans "Are you sure you want to publish this BigBlueButton presentation?"
{{ field }}
{% endif %}
{% if field.help_text %}
<small id="{{field.id_for_label}}Help" class="form-text text-muted">{{ field.help_text|safe }}</small>
<small id="{{field.id_for_label}}Help" class="form-text">{{ field.help_text|safe }}</small>
{% endif %}
{% if field.field.required %}<div class="invalid-feedback">{% trans "Please provide a valid value for this field" %}.</div>{%endif%}
{% if field.field.required %}<div class="invalid-feedback">{% trans "Please provide a valid value for this field." %}</div>{% endif %}
</div>
</div>
</div>
{% endspaceless %}
{% endfor %}
</fieldset>
{% trans "A video will be created from the BigBlueButton presentation and will be available on this platform." %}<br/>
<small class="form-text text-muted">{% trans "Please note: this treatment can take a long time. You will receive an email when this treatment is completed." %}</small>
<small class="form-text">{% trans "Please note: this treatment can take a long time. You will receive an email when this treatment is completed." %}</small>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary">{% trans "Publish this presentation" %}</button>
Expand Down
2 changes: 1 addition & 1 deletion pod/bbb/templates/bbb/record_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% endfor %}
</div>
{% if records.has_next %}
<a class="infinite-more-link" href="{{ full_path }}{% if '?' in full_path %}&{% else %}?{%endif%}page={{ records.next_page_number }}">{% trans "More" %}</a>
<a class="infinite-more-link" href="{{ full_path }}{% if '?' in full_path %}&{% else %}?{% endif %}page={{ records.next_page_number }}">{% trans "More" %}</a>
{% endif %}
<div class="infinite-loading" style="display: none;">
{% trans "Loading..." %}
Expand Down
4 changes: 3 additions & 1 deletion pod/chapter/static/js/chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ var showalert = function (message, alerttype) {
alerttype +
' alert-dismissible fade show" role="alert">' +
message +
'<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button></div>'
'<button type="button" class="close" data-dismiss="alert" aria-label="' +
gettext("Close") +
'"><span aria-hidden="true">&times;</span></button></div>'
);
setTimeout(function () {
$("#formalertdiv").remove();
Expand Down
6 changes: 3 additions & 3 deletions pod/completion/static/js/caption_maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,10 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
)}</span></div>`
),
startTimeBtn: $(
`<a class='startTimeBtn link-primary' href='#podvideoplayer'>${start}</a>`
`<a class='startTimeBtn btn-link' href='#podvideoplayer'>${start}</a>`
),
endTimeBtn: $(
`<a class='endTimeBtn link-primary' href='#podvideoplayer'>${end}</a>`
`<a class='endTimeBtn btn-link' href='#podvideoplayer'>${end}</a>`
),

// flags
Expand Down Expand Up @@ -589,7 +589,7 @@ function CreateCaptionBlock(newCaption, spawnFunction) {
},

init: function () {
var uniq = "c" + new Date().getTime();
var uniq = "c" + Math.floor(Math.random() * 100000000);
this.div.captionBlockObject = this;
this.captionTextInput.val(captionText);
this.captionTextInput.attr("id", uniq);
Expand Down
10 changes: 5 additions & 5 deletions pod/completion/templates/video_caption_maker.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{% trans 'Close' %}"></button>
</div>
{% endfor %}
<script>
Expand Down Expand Up @@ -125,11 +125,11 @@ <h2 class="h3" id="noCaptionsText">{% trans "No captions" %} </h5>
{% for field in form_make_caption.visible_fields %}
{% if field.name == 'src' %}
{% spaceless %}
<div class="form-group" >
<div class="form-group">
{{ field.errors }}
{{ field }}
{% if field.help_text %} <small id="{{field.id_for_label}}Help" class="form-text text-muted">{{ field.help_text|safe }}</small> {% endif %}
{% if field.field.required %} <div class="invalid-feedback">{% trans "Please provide a valid value for this field" %}.</div> {%endif%}
{% if field.help_text %} <small id="{{field.id_for_label}}Help" class="form-text">{{ field.help_text|safe }}</small> {% endif %}
{% if field.field.required %} <div class="invalid-feedback">{% trans "Please provide a valid value for this field." %}</div> {% endif %}
</div>
{% endspaceless %}
{% endif %}
Expand Down Expand Up @@ -194,7 +194,7 @@ <h5>{% trans "Captions Editor" %}</h5>
<div class="modal-content" style="min-height: auto; width: auto;">
<div class="modal-header">
<h2 class="modal-title" id="confirmSaveLabel">{% trans "Save captions file."%}</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>
</div>
<div class="modal-body">
<p>{% trans "You have loaded a file. Do you want to override it?"%}</p>
Expand Down
Loading

0 comments on commit 8209146

Please sign in to comment.