mediacms/templates/config/core/user.html
Yiannis Stergiou aa6520daac
Frontent dev env (#247)
* Added frontend development files/environment

* More items-categories related removals

* Improvements in pages templates (inc. static pages)

* Improvements in video player

* Added empty home page message + cta

* Updates in media, playlist and management pages

* Improvements in material icons font loading

* Replaced media & playlists links in frontend dev-env

* frontend package version update

* chnaged frontend dev url port

* static files update

* Changed default position of theme switcher

* enabled frontend docker container
2021-07-11 18:01:34 +03:00

29 lines
1.5 KiB
HTML

MediaCMS.user = {
name: {% if request.user.is_authenticated %}"{{request.user.username}}"{% else %}null{% endif %},
username: {% if request.user.is_authenticated %}"{{request.user.username}}"{% else %}null{% endif %},
thumbnail: {% if request.user.is_authenticated %}"{{request.user.thumbnail_url}}"{% else %}null{% endif %},
is: {
admin: {% if IS_MEDIACMS_ADMIN %}true{% else %}false{% endif %},
anonymous: {% if request.user.is_authenticated %}false{% else %}true{% endif %},
},
can: {
addMedia: {% if CAN_UPLOAD_MEDIA %}true{% else %}false{% endif %},
editMedia: {% if CAN_EDIT_MEDIA %}true{% else %}false{% endif %},
deleteMedia: {% if CAN_DELETE_MEDIA %}true{% else %}false{% endif %},
editSubtitle: {% if CAN_EDIT_MEDIA %}true{% else %}false{% endif %},
readComment: true,
addComment: true,
deleteComment: {% if CAN_DELETE_COMMENTS %}true{% else %}false{% endif %},
editProfile: {% if CAN_EDIT %}true{% else %}false{% endif %},
deleteProfile: {% if CAN_DELETE %}true{% else %}false{% endif %},
manageMedia: {% if IS_MEDIACMS_ADMIN or IS_MEDIACMS_MANAGER or IS_MEDIACMS_EDITOR %}true{% else %}false{% endif %},
manageUsers: {% if IS_MEDIACMS_ADMIN or IS_MEDIACMS_MANAGER %}true{% else %}false{% endif %},
manageComments: {% if IS_MEDIACMS_ADMIN or IS_MEDIACMS_MANAGER or IS_MEDIACMS_EDITOR %}true{% else %}false{% endif %},
},
pages: {
media: '/user/{{request.user.username}}',
about: '/user/{{request.user.username}}/about',
playlists: '/user/{{request.user.username}}/playlists',
}
};