Skip to content

Commit

Permalink
Merge branch 'master' into PHRAS-4096_release_4.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaillat authored Sep 6, 2024
2 parents 1c23357 + 73ce7b6 commit e887023
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 48 deletions.
27 changes: 10 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

FROM alchemyfr/phraseanet-base:1.0.0 as builder
FROM alchemyfr/phraseanet-base:1.0.0 AS builder

COPY --from=composer:2.1.6 /usr/bin/composer /usr/bin/composer

Expand Down Expand Up @@ -72,7 +72,7 @@ CMD []
# Phraseanet install and setup application image
#########################################################################

FROM alchemyfr/phraseanet-base:1.0.0 as phraseanet-setup
FROM alchemyfr/phraseanet-base:1.0.0 AS phraseanet-setup

COPY --from=builder --chown=app /var/alchemy/Phraseanet /var/alchemy/Phraseanet
ADD ./docker/phraseanet/root /
Expand All @@ -85,7 +85,7 @@ CMD []
# Phraseanet web application image
#########################################################################

FROM alchemyfr/phraseanet-base:1.0.0 as phraseanet-fpm
FROM alchemyfr/phraseanet-base:1.0.0 AS phraseanet-fpm

COPY --from=builder --chown=app /var/alchemy/Phraseanet /var/alchemy/Phraseanet
ADD ./docker/phraseanet/root /
Expand All @@ -97,7 +97,7 @@ CMD ["php-fpm", "-F"]
# Phraseanet worker application image
#########################################################################

FROM alchemyfr/phraseanet-base:1.0.0 as phraseanet-worker
FROM alchemyfr/phraseanet-base:1.0.0 AS phraseanet-worker

COPY --from=builder --chown=app /var/alchemy/Phraseanet /var/alchemy/Phraseanet
ADD ./docker/phraseanet/root /
Expand All @@ -123,7 +123,7 @@ CMD ["/bin/bash", "bin/run-worker.sh"]
# phraseanet-nginx
#########################################################################

FROM nginx:1.17.8-alpine as phraseanet-nginx
FROM nginx:1.17.8-alpine AS phraseanet-nginx
RUN adduser --uid 1000 --disabled-password app
RUN apk add --update apache2-utils \
&& rm -rf /var/cache/apk/*
Expand All @@ -139,10 +139,8 @@ HEALTHCHECK CMD wget --spider http://127.0.0.1/login || nginx -s reload || exit
# phraseanet adapted simplesaml service provider
#########################################################################

FROM alchemyfr/phraseanet-base:1.0.0 as phraseanet-saml-sp
RUN adduser --uid 1000 --disabled-password app
RUN echo "deb http://archive.debian.org/debian stretch main non-free" > /etc/apt/sources.list \
&& apt-get update \
FROM alchemyfr/phraseanet-base:1.0.0 AS phraseanet-saml-sp
RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
ca-certificates \
Expand All @@ -159,15 +157,10 @@ RUN echo "deb http://archive.debian.org/debian stretch main non-free" > /etc/apt
gettext \
mcrypt \
libldap2-dev \
&& curl -Ls https://github.com/simplesamlphp/simplesamlphp/releases/download/simplesamlphp-1.10.0/simplesamlphp-1.10.0.tar.gz | tar xzvf - -C /var/www/ \
&& docker-php-ext-install zip mbstring pdo_mysql gettext mcrypt \
&& pecl install \
redis-5.3.7 \
&& docker-php-ext-enable redis \
&& pecl clear-cache \
&& docker-php-source delete
&& curl -Ls https://github.com/simplesamlphp/simplesamlphp/releases/download/simplesamlphp-1.10.0/simplesamlphp-1.10.0.tar.gz | tar xzvf - -C /var/www/
ADD ./docker/phraseanet/saml-sp/root /
ENTRYPOINT ["/bootstrap/entrypoint.sh"]
CMD ["/bootstrap/bin/start-servers.sh"]
HEALTHCHECK CMD wget --spider http://127.0.0.1/ || nginx -s reload || exit
HEALTHCHECK CMD wget --spider http://127.0.0.1/ || nginx -s reload || exit


16 changes: 8 additions & 8 deletions templates/web/prod/WorkZone/ExposeEdit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@
<form id="publication-data-form-edit" >
<div class="edit-publication-block">
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Name' | trans }}</label>
<input type="text" value="{{ publication.title }}" name="title" class="publication-field"/>
<label for="expose-edit-title">{{ 'prod:expose:publication:Name' | trans }}</label>
<input id="expose-edit-title" type="text" value="{{ publication.title }}" name="title" class="publication-field"/>
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Slug' | trans }}</label>
<label for="slug-field">{{ 'prod:expose:publication:Slug' | trans }}</label>
<input type="text" data-actual-slug="{{ publication.slug }}" value="{{ publication.slug }}" name="slug" class="publication-field" id="slug-field"/>
<input type="button" class="slug-availability" style="height: 31px;" value="{{ 'prod:expose:publication:check slug' | trans }}">
<img class="expose-slug-ok" src="/assets/common/images/icons/ok.png" style="height: 32px;display:none;" >
<img class="expose-slug-nok" src="/assets/common/images/icons/red-cross.png" style="height: 32px;display:none;">
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Description' | trans }}</label>
<label for="description">{{ 'prod:expose:publication:Description' | trans }}</label>
<textarea class="publication-field description-field-edit" name="description" id="description" cols="250" rows="5" style="width: 530px;">{{ publication.description }}</textarea>
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Parent Publication' | trans }}</label>
<label for="publication_parent_edit">{{ 'prod:expose:publication:Parent Publication' | trans }}</label>
<div id="publication-list-data" class="ui-widget publication_parent_wrapper" style="margin-top: 10px;margin-left: 2px;">
{% if publication.parent.id %}
{% set parentId = publication.parent.id %}
Expand All @@ -60,7 +60,7 @@

{% if publication.capabilities.operator %}
<div class="ui-widget profile-wrapper hide">
<label>{{ 'prod:expose:publication:Profile' | trans }}</label>
<label for="profile-field">{{ 'prod:expose:publication:Profile' | trans }}</label>
{% set nbProfile = publication.profile|length %}

<select id="profile-field" name="profile" tabindex="-1" aria-hidden="true"
Expand Down Expand Up @@ -150,7 +150,7 @@
</div>
</form>

<form name="publication-json" id="publication-json" class="text-center">
<form autofocus name="publication-json" id="publication-json" class="text-center">
<div id="advancedSettingBlock">
{# <h4 class="toggleSetting">{{ 'prod:expose:publication:Advanced setting' | trans }}</h4>#}
<div id="advancedSettingInner" class="hidden">
Expand Down Expand Up @@ -397,9 +397,9 @@
success: function (data) {
if (data.success) {
publicationEdit.find("#pub-success").removeClass("hidden").html(data.message);
document.getElementById("publication-data-form-edit").reset();
setTimeout(function(){
$('#DIALOG-expose-edit').dialog('close');
publicationEdit.find("#pub-success").addClass("hidden");
}
, 2000
);
Expand Down
52 changes: 29 additions & 23 deletions templates/web/prod/WorkZone/ExposeNew.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,73 @@
<form id="publication-data-form" >
<div class="edit-publication-block">
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Name' | trans }}</label>
<input type="text" value="" name="title" class="publication-field"/>
<label for="expose-add-title">{{ 'prod:expose:publication:Name' | trans }}</label>
<input id="expose-add-title" type="text" value="" name="title" class="publication-field"/>
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Slug' | trans }}</label>
<label for="new-slug-field">{{ 'prod:expose:publication:Slug' | trans }}</label>
<input type="text" value="" name="slug" class="publication-field" id="new-slug-field"/>
<input type="button" class="new-slug-availability" style="height: 31px;" value="{{ 'prod:expose:publication:check slug' | trans }}">
<img class="new-expose-slug-ok" src="/assets/common/images/icons/ok.png" style="height: 32px;display:none;" >
<img class="new-expose-slug-nok" src="/assets/common/images/icons/red-cross.png" style="height: 32px;display:none;">
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Description' | trans }}</label>
<label for="description-new">{{ 'prod:expose:publication:Description' | trans }}</label>
<textarea name="description" class="publication-field description-field-new" id="description-new" cols="250" rows="5" style="width: 530px;"></textarea>
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Parent Publication' | trans }}</label>
<label for="publication_parent">{{ 'prod:expose:publication:Parent Publication' | trans }}</label>
<div id="publication-list-data" class="ui-widget publication_parent_wrapper" style="margin-top: 10px;margin-left: 2px;">
<select id="publication_parent" name="parent">
<option value="">{{ 'prod:expose:publication:Search a parent publication' | trans }}</option>
</select>
</div>
</div>
<div class="ui-widget profile-wrapper hide">
<label>{{ 'prod:expose:publication:Profile' | trans }} </label>
<label for="profile-field">{{ 'prod:expose:publication:Profile' | trans }} </label>
<select id="profile-field" name="profile" tabindex="-1" aria-hidden="true"
class="publication-field">
<option value="">{{ 'prod:expose:publication:Select Profile' | trans }}</option>
</select>
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Enabled' | trans }}</label>
<label class="switch">
<label for="enabled_combobox">{{ 'prod:expose:publication:Enabled' | trans }}</label>
<span class="switch">
<input id="enabled_combobox" type="checkbox" class="publication-field" name="enabled">
<span class="slider round"></span>
</label>
</span>
</div>
<div class="ui-widget available-wrapper">
<label>{{ 'prod:expose:publication:Available (leave blank for permanet publication)' | trans }}</label>
<div class="available-widget">
<label>{{ 'prod:expose:publication:From' | trans }}</label>
<input type="text" autocomplete="off" value="" name="beginsAt" class="new-use-datepicker publication-field"/>
<label for="beginsAt">
{{ 'prod:expose:publication:From' | trans }}
<input type="text" autocomplete="off" value="" id="beginsAt" name="beginsAt" class="new-use-datepicker publication-field"/>
</label>
</div>
<div class="available-widget">
<label>{{ 'prod:expose:publication:To' | trans }} </label>
<input type="text" autocomplete="off" value="" name="expiresAt" class="new-use-datepicker publication-field"/>
<label for="expiresAt">
{{ 'prod:expose:publication:To' | trans }}
<input type="text" autocomplete="off" value="" id="expiresAt" name="expiresAt" class="new-use-datepicker publication-field"/>
</label>
</div>
</div>
<div class="ui-widget">
<label>{{ 'prod:expose:publication:Publicly listing' | trans }}</label>
<label class="switch">
<label for="publication_publiclyListed" class="switch">
<input id="publication_publiclyListed" type="checkbox" class="publication-field" name="publiclyListed">
<span class="slider round"></span>
</label>
</div>
<div class="ui-widget access-wrapper available-wrapper">
<label>{{ 'prod:expose:publication:Access rules' | trans }}</label>
<label for="publication_securityMethod">{{ 'prod:expose:publication:Access rules' | trans }}</label>
<div class="available-widget">
<select id="publication_securityMethod" name="securityMethod" tabindex="-1" aria-hidden="true"
class="publication-field">
<option value="">{{ 'prod:expose:publication:Open access' | trans }}</option>
<option value="password">{{ 'prod:expose:publication:Password' | trans }}</option>
<option value="authentication">{{ 'prod:expose:publication:Users' | trans }}</option>
</select>
<select id="publication_securityMethod" name="securityMethod" tabindex="-1" aria-hidden="true"
class="publication-field">
<option value="">{{ 'prod:expose:publication:Open access' | trans }}</option>
<option value="password">{{ 'prod:expose:publication:Password' | trans }}</option>
<option value="authentication">{{ 'prod:expose:publication:Users' | trans }}</option>
</select>
</div>
<div class="available-widget ui-widget securityOptions_wrapper visibility-hidden">
<input class="publication-field" type="text" name="password" placeholder="Password"
Expand Down Expand Up @@ -105,7 +109,7 @@
</div>
</form>

<form name="publication-json" id="publication-json" class="text-center">
<form autofocus name="publication-json" id="publication-json" class="text-center">
<div id="advancedSettingBlock">
{# <h4 class="toggleSetting">{{ 'prod:expose:publication:Advanced setting' | trans }}</h4>#}
<div id="advancedSettingInner" class="hidden">
Expand Down Expand Up @@ -394,9 +398,11 @@
success: function (data) {
if (data.success) {
$("#DIALOG-expose-add #pub-success").removeClass("hidden").html(data.message + ": " + data.link);
document.getElementById("publication-data-form").reset();
setTimeout(function(){
document.getElementById("publication-data-form").reset();
$('#DIALOG-expose-add').dialog('close');
$("#DIALOG-expose-add #pub-success").addClass("hidden");
}
, 2000
);
Expand Down

0 comments on commit e887023

Please sign in to comment.