Skip to content

Commit

Permalink
Merge pull request #795 from ae-utbm/taiste
Browse files Browse the repository at this point in the history
Last update before Inté
  • Loading branch information
imperosol authored Aug 27, 2024
2 parents af724a1 + e564c66 commit b4749f2
Show file tree
Hide file tree
Showing 129 changed files with 917 additions and 33,671 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
poetry install --with prod --without docs,tests
poetry run ./manage.py install_xapian
poetry run ./manage.py migrate
echo "yes" | poetry run ./manage.py collectstatic
poetry run ./manage.py compilestatic
poetry run ./manage.py collectstatic --clear --noinput
poetry run ./manage.py compilemessages
sudo systemctl restart uwsgi
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/taiste.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:
poetry install --with prod --without docs,tests
poetry run ./manage.py install_xapian
poetry run ./manage.py migrate
echo "yes" | poetry run ./manage.py collectstatic
poetry run ./manage.py compilestatic
poetry run ./manage.py collectstatic --clear --noinput
poetry run ./manage.py compilemessages
sudo systemctl restart uwsgi
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion com/templates/com/screen_slideshow.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="fr">
<head>
<title>{% trans %}Slideshow{% endtrans %}</title>
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
<link href="{{ scss('com/css/slideshow.scss') }}" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="slideshow">
Expand Down
9 changes: 8 additions & 1 deletion core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from django.contrib import admin
from django.contrib.auth.models import Group as AuthGroup

from core.models import Group, Page, SithFile, User
from core.models import Group, OperationLog, Page, SithFile, User

admin.site.unregister(AuthGroup)

Expand Down Expand Up @@ -53,3 +53,10 @@ class SithFileAdmin(admin.ModelAdmin):
list_display = ("name", "owner", "size", "date", "is_in_sas")
autocomplete_fields = ("parent", "owner", "moderator")
search_fields = ("name", "parent__name")


@admin.register(OperationLog)
class OperationLogAdmin(admin.ModelAdmin):
list_display = ("label", "operator", "operation_type", "date")
search_fields = ("label", "date", "operation_type")
autocomplete_fields = ("operator",)
69 changes: 0 additions & 69 deletions core/management/commands/compilestatic.py

This file was deleted.

55 changes: 0 additions & 55 deletions core/scss/processor.py

This file was deleted.

43 changes: 0 additions & 43 deletions core/scss/storage.py

This file was deleted.

32 changes: 28 additions & 4 deletions core/static/core/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,41 @@ function getCSRFToken() {

const initialUrlParams = new URLSearchParams(window.location.search);

function update_query_string(key, value) {
const url = new URL(window.location.href);
/**
* @readonly
* @enum {number}
*/
const History = {
NONE: 0,
PUSH: 1,
REPLACE: 2,
};

/**
* @param {string} key
* @param {string | string[] | null} value
* @param {History} action
* @param {URL | null} url
*/
function update_query_string(key, value, action = History.REPLACE, url = null) {
if (!url){
url = new URL(window.location.href);
}
if (!value) {
// If the value is null, undefined or empty => delete it
url.searchParams.delete(key)
} else if (Array.isArray(value)) {

url.searchParams.delete(key)
value.forEach((v) => url.searchParams.append(key, v))
} else {
url.searchParams.set(key, value);
}
history.pushState(null, document.title, url.toString());

if (action === History.PUSH) {
history.pushState(null, "", url.toString());
} else if (action === History.REPLACE) {
history.replaceState(null, "", url.toString());
}

return url;
}
3 changes: 0 additions & 3 deletions core/static/core/js/sentry/bundle.min.js

This file was deleted.

Loading

0 comments on commit b4749f2

Please sign in to comment.