Merge branch 'master' of https://github.com/alchemy-fr/Phraseanet into PHRAS-2175-subdef-building-duration
100
.circleci/config.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/alchemy-fr/Phraseanet
|
||||
parallelism: 2
|
||||
shell: /bin/bash --login
|
||||
environment:
|
||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
||||
docker:
|
||||
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
|
||||
command: /sbin/init
|
||||
steps:
|
||||
- checkout
|
||||
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
|
||||
- run:
|
||||
working_directory: ~/alchemy-fr/Phraseanet
|
||||
command: nvm install stable && nvm alias default stable
|
||||
- run:
|
||||
working_directory: ~/alchemy-fr/Phraseanet
|
||||
command: 'sudo service memcached status || sudo service memcached start; sudo
|
||||
redis-cli ping >/dev/null 2>&1 || sudo service redis-server start; sudo
|
||||
service mysql status || sudo service mysql start; sudo service rabbitmq-server
|
||||
status || sudo service rabbitmq-server start; '
|
||||
# Dependencies
|
||||
# This would typically go in either a build or a build-and-test job when using workflows
|
||||
# Restore the dependency cache
|
||||
- restore_cache:
|
||||
keys:
|
||||
# This branch if available
|
||||
- v1-dep-{{ .Branch }}-
|
||||
# Default branch if not
|
||||
- v1-dep-master-
|
||||
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
|
||||
- v1-dep-
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run: git clone https://github.com/alanxz/rabbitmq-c
|
||||
- run: cd rabbitmq-c && git checkout 2ca1774489328cde71195f5fa95e17cf3a80cb8a
|
||||
- run: cd rabbitmq-c && git submodule init && git submodule update && autoreconf -i && ./configure && make && sudo make install
|
||||
- run: pecl channel-update pear.php.net
|
||||
- run: yes '' | pecl install amqp-1.9.3
|
||||
- run: yes '' | pecl install imagick
|
||||
- run: sudo apt-get install libzmq-dev
|
||||
- run: yes '' | pecl install zmq-beta
|
||||
- run: echo "extension = amqp.so" > /opt/circleci/php/$(phpenv global)/etc/conf.d/amqp.ini
|
||||
- run: echo "extension = zmq.so" > /opt/circleci/php/$(phpenv global)/etc/conf.d/zmq.ini
|
||||
- run: echo "date.timezone = UTC" > /opt/circleci/php/$(phpenv global)/etc/conf.d/timezone.ini
|
||||
- run: sed -i 's/^\(session.cache_limiter = \).*/\1""/' /opt/circleci/php/$(phpenv global)/etc/php.ini
|
||||
- run: npm rebuild node-sass
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run: composer install --no-progress --no-interaction --optimize-autoloader
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run: node -v
|
||||
- run: npm -v
|
||||
- run: npm install
|
||||
- run: if [[ ! -e elasticsearch-2.3.3 ]]; then wget --no-check-certificate https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.3.3.tar.gz && tar -xvf elasticsearch-2.3.3.tar.gz && elasticsearch-2.3.3/bin/plugin install analysis-icu; fi
|
||||
- run:
|
||||
command: elasticsearch-2.3.3/bin/elasticsearch
|
||||
background: true
|
||||
# Save dependency cache
|
||||
- save_cache:
|
||||
key: v1-dep-{{ .Branch }}-{{ epoch }}
|
||||
paths:
|
||||
# This is a broad list of cache paths to include many possible development environments
|
||||
# You can probably delete some of these entries
|
||||
- vendor/bundle
|
||||
- ~/virtualenvs
|
||||
- ~/.m2
|
||||
- ~/.ivy2
|
||||
- ~/.bundle
|
||||
- ~/.go_workspace
|
||||
- ~/.gradle
|
||||
- ~/.cache/bower
|
||||
# These cache paths were specified in the 1.0 config
|
||||
- elasticsearch-2.3.3
|
||||
- node_modules
|
||||
- ~/.composer
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run: mysql -u ubuntu -e 'CREATE DATABASE update39_test;CREATE DATABASE ab_test;CREATE DATABASE db_test;SET @@global.sql_mode=STRICT_ALL_TABLES;SET @@global.max_allowed_packet=33554432;SET @@global.wait_timeout=999999;';
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run: ./bin/developer system:uninstall -v
|
||||
- run: ./bin/setup system:install -v --email=test@phraseanet.com --password=test --db-host=127.0.0.1 --db-user=ubuntu --db-template=fr-simple --db-password= --databox=db_test --appbox=ab_test --server-name=http://127.0.0.1 -y;
|
||||
- run: ./bin/developer ini:setup-tests-dbs -v
|
||||
- run: ./bin/console searchengine:index:create -v
|
||||
- run: ./bin/developer phraseanet:regenerate-sqlite -v
|
||||
- run: ./bin/developer phraseanet:generate-js-fixtures -v
|
||||
# Test
|
||||
# This would typically be a build job when using workflows, possibly combined with build
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run: case $CIRCLE_NODE_INDEX in 0) EXIT=0; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-unit.xml --exclude-group legacy || EXIT=$?; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-no-web.xml --group legacy --exclude-group web || EXIT=$?; exit $EXIT;; 1) php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-web.xml --group web ;; esac
|
||||
# Teardown
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
# Save test results
|
||||
- store_test_results:
|
||||
path: /tmp/circleci-test-results
|
||||
# Save artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-test-results
|
66
circle.yml
@@ -1,66 +0,0 @@
|
||||
general:
|
||||
branches:
|
||||
ignore:
|
||||
- '3.6'
|
||||
- '3.7'
|
||||
- '3.8'
|
||||
|
||||
machine:
|
||||
php:
|
||||
version: 7.0.24 #5.6.22
|
||||
node:
|
||||
version: stable
|
||||
services:
|
||||
- memcached
|
||||
- redis
|
||||
- mysql
|
||||
- rabbitmq-server
|
||||
|
||||
dependencies:
|
||||
cache_directories:
|
||||
- elasticsearch-2.3.3 # relative to the build directory
|
||||
- node_modules
|
||||
- ~/.composer
|
||||
pre:
|
||||
- git clone https://github.com/alanxz/rabbitmq-c
|
||||
- cd rabbitmq-c && git checkout 2ca1774489328cde71195f5fa95e17cf3a80cb8a
|
||||
- cd rabbitmq-c && git submodule init && git submodule update && autoreconf -i && ./configure && make && sudo make install
|
||||
- pecl channel-update pear.php.net
|
||||
- yes '' | pecl install amqp-1.9.3
|
||||
- yes '' | pecl install imagick
|
||||
- sudo apt-get install libzmq-dev
|
||||
- yes '' | pecl install zmq-beta
|
||||
- echo "extension = amqp.so" > /opt/circleci/php/$(phpenv global)/etc/conf.d/amqp.ini
|
||||
- echo "extension = zmq.so" > /opt/circleci/php/$(phpenv global)/etc/conf.d/zmq.ini
|
||||
- echo "date.timezone = UTC" > /opt/circleci/php/$(phpenv global)/etc/conf.d/timezone.ini
|
||||
- sed -i 's/^\(session.cache_limiter = \).*/\1""/' /opt/circleci/php/$(phpenv global)/etc/php.ini
|
||||
- npm rebuild node-sass
|
||||
override:
|
||||
- composer install --no-progress --no-interaction --optimize-autoloader
|
||||
post:
|
||||
- node -v
|
||||
- npm -v
|
||||
- npm install
|
||||
- if [[ ! -e elasticsearch-2.3.3 ]]; then wget --no-check-certificate https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.3.3.tar.gz && tar -xvf elasticsearch-2.3.3.tar.gz && elasticsearch-2.3.3/bin/plugin install analysis-icu; fi
|
||||
- elasticsearch-2.3.3/bin/elasticsearch: {background: true}
|
||||
|
||||
database:
|
||||
override:
|
||||
- mysql -u ubuntu -e 'CREATE DATABASE update39_test;CREATE DATABASE ab_test;CREATE DATABASE db_test;SET @@global.sql_mode=STRICT_ALL_TABLES;SET @@global.max_allowed_packet=33554432;SET @@global.wait_timeout=999999;';
|
||||
post:
|
||||
- "./bin/developer system:uninstall -v"
|
||||
- "./bin/setup system:install -v --email=test@phraseanet.com --password=test --db-host=127.0.0.1 --db-user=ubuntu --db-template=fr-simple --db-password= --databox=db_test --appbox=ab_test --server-name=http://127.0.0.1 -y;"
|
||||
- "./bin/developer ini:setup-tests-dbs -v"
|
||||
- "./bin/console searchengine:index:create -v"
|
||||
- "./bin/developer phraseanet:regenerate-sqlite -v"
|
||||
- "./bin/developer phraseanet:generate-js-fixtures -v"
|
||||
|
||||
#test:
|
||||
# override:
|
||||
# - case $CIRCLE_NODE_INDEX in 0) EXIT=0; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-unit.xml --exclude-group legacy || EXIT=$?; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-no-web.xml --group legacy --exclude-group web || EXIT=$?; exit $EXIT;; 1) php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-web.xml --group web ;; esac:
|
||||
# #- php -d memory_limit=-1 bin/phpunit -c phpunit.xml.dist;
|
||||
|
||||
test:
|
||||
override:
|
||||
- case $CIRCLE_NODE_INDEX in 0) EXIT=0; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-unit.xml --exclude-group legacy || EXIT=$?; php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-no-web.xml --group legacy --exclude-group web || EXIT=$?; exit $EXIT;; 1) php -d memory_limit=-1 bin/phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit-legacy-web.xml --group web ;; esac:
|
||||
parallel: true
|
@@ -25,7 +25,7 @@ class Notifier implements NotifierInterface
|
||||
private $logger;
|
||||
|
||||
/** @var integer */
|
||||
private $timeout = 2;
|
||||
private $timeout = 10;
|
||||
|
||||
public function __construct(\ZMQSocket $socket, LoggerInterface $logger)
|
||||
{
|
||||
|
@@ -839,19 +839,19 @@ class User_Query
|
||||
}
|
||||
|
||||
if ($this->activities) {
|
||||
$sql .= $this->generate_field_constraints('activite', $this->activities);
|
||||
$sql .= $this->generate_field_constraints('activity', $this->activities);
|
||||
}
|
||||
|
||||
if ($this->positions) {
|
||||
$sql .= $this->generate_field_constraints('fonction', $this->positions);
|
||||
$sql .= $this->generate_field_constraints('job', $this->positions);
|
||||
}
|
||||
|
||||
if ($this->countries) {
|
||||
$sql .= $this->generate_field_constraints('pays', $this->countries);
|
||||
$sql .= $this->generate_field_constraints('country', $this->countries);
|
||||
}
|
||||
|
||||
if ($this->companies) {
|
||||
$sql .= $this->generate_field_constraints('societe', $this->companies);
|
||||
$sql .= $this->generate_field_constraints('company', $this->companies);
|
||||
}
|
||||
|
||||
if ($this->templates) {
|
||||
|
6240
package-lock.json
generated
BIN
resources/www/common/images/icons/chevron-left-blue.png
Normal file
After Width: | Height: | Size: 535 B |
BIN
resources/www/common/images/icons/chevron-left-green.png
Normal file
After Width: | Height: | Size: 555 B |
BIN
resources/www/common/images/icons/chevron-left-white.png
Normal file
After Width: | Height: | Size: 296 B |
BIN
resources/www/common/images/icons/orange-pen.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
resources/www/common/images/icons/orange-plus.png
Normal file
After Width: | Height: | Size: 253 B |
BIN
resources/www/common/images/icons/orange-refresh.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
resources/www/common/images/icons/orange-save.png
Normal file
After Width: | Height: | Size: 929 B |
BIN
resources/www/common/images/icons/orange-search.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/www/common/images/icons/orange-share.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/www/common/images/icons/white-refresh.png
Normal file
After Width: | Height: | Size: 728 B |
BIN
resources/www/common/images/icons/white-share.png
Normal file
After Width: | Height: | Size: 870 B |
@@ -86,14 +86,12 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="PNB" style="top:auto;height:20px;text-align:right;line-height:20px;">
|
||||
{% set length = list.getEntries().count() %}
|
||||
<span class="counter current">{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}</span>
|
||||
{% if query.get_page() > 1 %}
|
||||
<a class="prev" value="{{ query.get_page() - 1 }}" href="#">< {{ 'Previous' | trans }}</a>
|
||||
<a class="prev" value="{{ query.get_page() - 1 }}" href="#">« {{ 'Previous' | trans }}</a>
|
||||
{% endif %}
|
||||
{{ query.get_page() }} / {{ query.get_total_page() }}
|
||||
{% if query.get_page() < query.get_total_page() %}
|
||||
<a class="next" value="{{ query.get_page() + 1 }}" href="#">{{ 'Next' | trans }} ></a>
|
||||
<a class="next" value="{{ query.get_page() + 1 }}" href="#">{{ 'Next' | trans }} »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,17 +100,17 @@
|
||||
|
||||
|
||||
{% macro badgeReadonly(entry, role) %}
|
||||
<div class="badge">
|
||||
<div class="badge listmanager_badge">
|
||||
<input type="hidden" value="{{ entry.getUser().getId() }}" name="id">
|
||||
{% if role >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
{#{% if role >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
<a class="deleter listmanager-delete-list-user-action" href="#" data-list-id="" data-user-id="{{ entry.getUser().getId() }}">
|
||||
<img src="/assets/prod/images/Push/close_badge.png">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}#}
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/assets/common/images/icons/user.png"/>
|
||||
<td class="listmanager_badge_img">
|
||||
<img src="/assets/common/images/icons/user-white.png"/>
|
||||
</td>
|
||||
<td class="infos" >
|
||||
<span class="name">{{ entry.getUser().getDisplayName() }}</span>
|
||||
|
@@ -1,53 +1,84 @@
|
||||
{% import 'prod/actions/Feedback/ListsMacros.html.twig' as ListsMacros %}
|
||||
|
||||
<div class="PNB10">
|
||||
<div class="PNB theme-bg" style="height:40px; bottom:auto;">
|
||||
<table style="height: 40px;">
|
||||
<tr>
|
||||
<td style="white-space:nowrap;">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
<form class="form-inline" method="POST" name="SaveName" action="{{ path('prod_lists_list_update', { 'list_id' : list.getId() }) }}">
|
||||
<label>{{ 'List Name' | trans }}</label>
|
||||
<input type="text" name="name" style="margin: 0 5px;" value="{{ list.getName() }}"/>
|
||||
<button class="btn btn-inverse">{{ 'Save' | trans }}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<h1>{{ list.getName() }}</h1>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="text-align:right;white-space:nowrap;">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() == constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}
|
||||
<a href="{{ path('prod_lists_list_share', { 'list_id' : list.getId() }) }}" title="{{ 'Share the list' | trans }}"
|
||||
class="list_sharer push-list-share-action"
|
||||
|
||||
data-list-id="{{ list.getId() }}">
|
||||
<img src="/assets/prod/images/Push/list-icon.png" />
|
||||
{{ "Set sharing permission" | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}
|
||||
<td style="text-align:right;white-space:nowrap;width:150px;">
|
||||
<button class="deleter btn btn-inverse listmanager-delete-list-action" data-list-id="{{ list.getId() }}">
|
||||
{{ 'Delete' | trans }}
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
<div class="PNB10" style="height: 46px;bottom:auto;line-height:26px;">
|
||||
<div class="pull-left">
|
||||
<div id="find-user">
|
||||
<input class="search" name="users-search" placeholder="{{ list.getName() }}" type="text" style="width:210px;"/>
|
||||
</div>
|
||||
<p id="recommanded-users">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div class="PNB content readonly grey-bg" style="top:40px;">
|
||||
<div class="pull-left">
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANADMIN')) %}
|
||||
<a href="#" class="push-add-user btn btn-push-orange" style="width:120px;margin-left:30px;margin-top:2px;">
|
||||
<img src="/assets/common/images/icons/orange-plus.png" class="image-normal">
|
||||
<img src="/assets/common/images/icons/white-plus.png" class="image-hover">
|
||||
{{ 'Create a user' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() == constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}
|
||||
<a href="{{ path('prod_lists_list_share', { 'list_id' : list.getId() }) }}"
|
||||
class="btn btn-push-orange list_sharer push-list-share-action"
|
||||
style="margin-top:2px;height:20px;line-height:22px;"
|
||||
title="{{ 'Share the list' | trans }}"
|
||||
data-list-id="{{ list.getId() }}">
|
||||
<span>
|
||||
<img src="/assets/common/images/icons/orange-share.png" class="image-normal" style="margin-right: 15px;">
|
||||
<img src="/assets/common/images/icons/white-share.png" class="image-hover" style="margin-right: 15px;">
|
||||
</span>
|
||||
{{ 'Share my list' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="PNB10" style="top:55px;">
|
||||
<div class="PNB content user_content readonly grey-bg">
|
||||
<div class="PNB10">
|
||||
<div class="PNB" style="height:25px; bottom:auto;">
|
||||
<p>
|
||||
<div class="pull-left">
|
||||
<h2 style="font-size:25px;margin:0;line-height:30px;">{{ list.getName() }}</h2>
|
||||
{% set length = list.getEntries().count() %}
|
||||
<span class="counter current">{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}</span>
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
<button class="EditToggle btn btn-inverse">{{ 'Edit' | trans }}</button>
|
||||
{% endif %}
|
||||
</p>
|
||||
<span class="counter current">
|
||||
{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}
|
||||
</span>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<div class="pull-left" style="margin-right:45px;">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
<button class="EditToggle btn btn-push-orange btn-orange-inverse" style="line-height: 22px;">
|
||||
<span>
|
||||
<img src="/assets/common/images/icons/orange-pen.png" class="image-normal" style="margin-right: 10px;">
|
||||
<img src="/assets/common/images/icons/white-pen.png" class="image-hover" style="margin-right: 10px;">
|
||||
</span>
|
||||
{{ 'Advanced mode' | trans }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="options pull-left">
|
||||
<div class="pull-left">
|
||||
<button class="select-all push-add-user btn btn-push-orange orange-border"
|
||||
style="margin-right: 8px;">
|
||||
{{ 'Select all' | trans }}
|
||||
</button>
|
||||
<button class="unselect-all push-add-user btn btn-push-orange orange-border">
|
||||
{{ 'Deselect all' | trans }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}
|
||||
<button class="delete-selection btn btn-inverse listmanager-delete-list-action"
|
||||
data-list-id="{{ list.getId() }}"
|
||||
style="margin-left:45px;">
|
||||
{{ 'Delete the selection' | trans }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PNB" style="top:35px;overflow:auto;">
|
||||
<div class="PNB" style="top:80px;overflow:auto;">
|
||||
{% set role = list.getOwner(app.getAuthenticatedUser()).getRole() %}
|
||||
{% for entry in list.getEntries() %}
|
||||
{{ ListsMacros.badgeReadonly(entry, role) }}
|
||||
@@ -56,12 +87,51 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
<div class="PNB content readwrite grey-bg" style="display:none;top:40px;">
|
||||
<div class="PNB content readwrite user_content" style="display:none;">
|
||||
<div class="PNB10" style="height:40px; bottom:auto;">
|
||||
<table style="height: 40px;">
|
||||
<tr>
|
||||
<td style="white-space:nowrap;">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
<form class="form-inline" method="POST" name="SaveName" action="{{ path('prod_lists_list_update', { 'list_id' : list.getId() }) }}">
|
||||
<label style="margin-right: 45px;">{{ 'List Name' | trans }}</label>
|
||||
<input type="text" name="name" class="text_input_white orange_text" style="margin: 0 5px;" value="{{ list.getName() }}"/>
|
||||
{% set length = list.getEntries().count() %}
|
||||
<span class="counter current">
|
||||
{% trans with {'%length%' : length} %}%length% peoples{% endtrans %}
|
||||
</span>
|
||||
<button class="saveList pull-right orange_text">
|
||||
<img src="/assets/common/images/icons/orange-save.png" class="image-normal">
|
||||
<img src="/assets/common/images/icons/white-save.png" class="image-hover">
|
||||
{{ 'Save' | trans }}
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<h1>{{ list.getName() }}</h1>
|
||||
{% endif %}
|
||||
</td>
|
||||
{#<td style="text-align:right;white-space:nowrap;">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() == constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_ADMIN') %}
|
||||
<a href="{{ path('prod_lists_list_share', { 'list_id' : list.getId() }) }}" title="{{ 'Share the list' | trans }}"
|
||||
class="list_sharer push-list-share-action"
|
||||
data-list-id="{{ list.getId() }}">
|
||||
<img src="/assets/prod/images/Push/list-icon.png" />
|
||||
{{ "Set sharing permission" | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>#}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form name="list-editor-search" method="POST" action="{{ path('prod_push_list_edit', { 'list_id' : list.getId() }) }}">
|
||||
<div class="PNB10" style="height:160px;">
|
||||
<div class="PNB10 list_editor_search" style="height:160px;">
|
||||
<div class="PNB" style="height:40px;bottom:auto;">
|
||||
<button class="Refresher btn btn-inverse" type="button"><{{ 'View' | trans }}</button>
|
||||
<select name="like_field">
|
||||
<a class="Refresher btn push-back-link btn-inverse">
|
||||
<img src="/assets/common/images/icons/chevron-left-white.png" class="image-normal">
|
||||
<img src="/assets/common/images/icons/chevron-left-blue.png" class="image-hover">
|
||||
<span>{{ 'See the list' | trans }}</span>
|
||||
</a>
|
||||
<select name="like_field" style="margin-right:30px;height:25px;">
|
||||
<option value="usr_login">
|
||||
{{ 'Push::filter on login' | trans }}
|
||||
</option>
|
||||
@@ -82,31 +152,45 @@
|
||||
</option>
|
||||
</select>
|
||||
{{ 'Push::filter starts' | trans }}
|
||||
<input type="text" value="" class="search" name="query">
|
||||
<button type="submit" class="btn btn-inverse">{{ 'boutton::chercher' | trans }}</button>
|
||||
<input type="text" value="" placeholder="Search" name="query" style="height:15px;margin:2px;">
|
||||
<button type="submit" class="list_refresh btn" style="margin-top:1px;height:25px;width:25px;line-height: 10px;">
|
||||
<img src="/assets/common/images/icons/orange-search.png" alt="Search" class="image-normal">
|
||||
<img src="/assets/common/images/icons/white-search.png" alt="Search" class="image-hover">
|
||||
</button>
|
||||
</div>
|
||||
<div class="PNB" style="top:40px;height:120px;bottom:auto;">
|
||||
<div class="PNB list_editor_selector" style="top:40px;height:120px;bottom:auto;">
|
||||
<table style="table-layout:fixed;width:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<label>{{ 'Activite' | trans }}</label>
|
||||
<label>{{ 'E-mail domain' | trans }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>{{ 'Template' | trans }}</label>
|
||||
<label>{{ 'Activity' | trans }}</label>
|
||||
</td>
|
||||
<td >
|
||||
<label>{{ 'Company' | trans }}</label>
|
||||
</td>
|
||||
<td >
|
||||
<label>{{ 'Position' | trans }}</label>
|
||||
</td>
|
||||
<td >
|
||||
<label>{{ 'Country' | trans }}</label>
|
||||
</td>
|
||||
<td >
|
||||
<label>{{ 'Position' | trans }}</label>
|
||||
<label>{{ 'Models' | trans }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select size="5" multiple="multiple" name="Activity[]" style="width:80%;">
|
||||
<select size="5" multiple="multiple" name="Email[]" style="width:95%;">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for Email in query.getRelatedActivities() %}
|
||||
<option value="{{ Email }}">{{ Email }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select size="5" multiple="multiple" name="Activity[]" style="width:95%;">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for Activity in query.getRelatedActivities() %}
|
||||
<option value="{{ Activity }}">{{ Activity }}</option>
|
||||
@@ -114,15 +198,7 @@
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select size="5" multiple="multiple" name="Template[]" style="width:80%;">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for Template in query.getRelatedTemplates() %}
|
||||
<option value="{{ Template }}">{{ Template }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select size="5" multiple="multiple" name="Company[]" style="width:80%;">
|
||||
<select size="5" multiple="multiple" name="Company[]" style="width:95%;">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for Company in query.getRelatedCompanies() %}
|
||||
<option value="{{ Company }}">{{ Company }}</option>
|
||||
@@ -130,7 +206,15 @@
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select size="5" multiple="multiple" name="Country[]" style="width:80%;">
|
||||
<select size="5" multiple="multiple" name="Position[]" style="width:95%;">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for Position in query.getRelatedPositions() %}
|
||||
<option value="{{ Position }}">{{ Position }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select size="5" multiple="multiple" name="Country[]" style="width:95%;">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for Code, Country in query.getRelatedCountries() %}
|
||||
<option value="{{ Code }}">{{ Country }}</option>
|
||||
@@ -138,10 +222,10 @@
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select size="5" multiple="multiple" name="Position[]" style="width:80%;">
|
||||
<select size="5" multiple="multiple" name="Template[]" style="width:95%;">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for Position in query.getRelatedPositions() %}
|
||||
<option value="{{ Position }}">{{ Position }}</option>
|
||||
{% for Template in query.getRelatedTemplates() %}
|
||||
<option value="{{ Template }}">{{ Template }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
@@ -154,10 +238,8 @@
|
||||
<input type="hidden" name="ord" value="{{ ord }}" />
|
||||
<input type="hidden" name="type" value="fragment" />
|
||||
</form>
|
||||
<div class="PNB content" style="top:180px;">
|
||||
<div class="PNB10">
|
||||
{{ ListsMacros.ResultTable(query, results, list, sort, ord) }}
|
||||
</div>
|
||||
<div class="PNB10 content" style="top:240px;">
|
||||
{{ ListsMacros.ResultTable(query, results, list, sort, ord) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -1,27 +1,41 @@
|
||||
|
||||
<div class="PNB10 lists">
|
||||
<h1>{{ 'Lists' | trans }}</h1>
|
||||
<span class="action">
|
||||
<a href="{{ path('prod_lists_list') }}" class="list_adder link push-add-list-action">
|
||||
{{ "Add" | trans }}
|
||||
</a>
|
||||
<a href="{{ path('prod_lists_all') }}" class="list_refresh link push-refresh-list-action">
|
||||
{{ "Refresh" | trans }}
|
||||
</a>
|
||||
</span>
|
||||
<ul class="lists">
|
||||
{% for list in lists %}
|
||||
<li class="list" style="padding:2px;">
|
||||
<a href="#" class="list_link list-edit-action" data-list-id="{{ list.getId() }}">
|
||||
{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}
|
||||
<img src="/assets/prod/images/Push/list-icon.png" />
|
||||
{% else %}
|
||||
<img src="/assets/common/images/icons/SHARE16.png" />
|
||||
{% endif %}
|
||||
{{ list.getName() }}
|
||||
<span class="counter">({{ list.getEntries().count() }})</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="PNB lists content">
|
||||
<div style="padding:10px 20px 10px;">
|
||||
<ul class="general_togglers" style="list-style: none;">
|
||||
<li>
|
||||
<a href="{{ path('prod_lists_list') }}" class="list_adder link push-add-list-action push-add-user btn btn-block btn-push-orange">
|
||||
<img src="/assets/common/images/icons/orange-plus.png" class="image-normal">
|
||||
<img src="/assets/common/images/icons/white-plus.png" class="image-hover">
|
||||
{{ "Add a list" | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="padding: 0 10px;">
|
||||
<span class="main-title">
|
||||
<img src="/assets/common/images/icons/list-grey.png">{{ 'Lists' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('prod_lists_all') }}" class="list_refresh link push-refresh-list-action btn pull-right" style="margin-top: -2px;">
|
||||
<img src="/assets/common/images/icons/orange-refresh.png" alt="Refresh list" class="image-normal">
|
||||
<img src="/assets/common/images/icons/white-refresh.png" alt="Refresh list" class="image-hover">
|
||||
</a>
|
||||
</div>
|
||||
<ul class="lists">
|
||||
{% for list in lists %}
|
||||
<li class="list lists_manager_list" style="padding:0;position:relative;">
|
||||
<a href="#" class="list_link list-edit-action" data-list-id="{{ list.getId() }}">
|
||||
{#{% if list.getOwner(app.getAuthenticatedUser()).getRole() >= constant('Alchemy\\Phrasea\\Model\\Entities\\UsrListOwner::ROLE_EDITOR') %}#}
|
||||
{#<img src="/assets/prod/images/Push/list-icon.png" />#}
|
||||
{#{% else %}#}
|
||||
{#<img src="/assets/common/images/icons/SHARE16.png" />#}
|
||||
{#{% endif %}#}
|
||||
{{ list.getName() }}
|
||||
<span class="counter">({{ list.getEntries().count() }})</span>
|
||||
</a>
|
||||
<button class="list-trash-btn">
|
||||
<img src="/assets/common/images/icons/delete-black.png" class="image-normal"/>
|
||||
<img src="/assets/common/images/icons/delete-white.png" class="image-hover"/>
|
||||
</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
@@ -60,7 +60,7 @@
|
||||
<div class="list-container">
|
||||
<span class="main-title">
|
||||
<img src="/assets/common/images/icons/list-grey.png"/>{{ 'Lists' | trans }}</span>
|
||||
<ul class="list">
|
||||
<ul class="lists">
|
||||
{% for list in lists %}
|
||||
<li class="list" style="padding:6px 2px;position: relative;"
|
||||
data-list-id= {{ list.getId() }}>
|
||||
@@ -262,39 +262,41 @@
|
||||
</div>
|
||||
|
||||
<div id="ListManager" class="PNB PushBox" style="display:none;">
|
||||
<div class="PNB theme-bg" style="left:10px;height:50px;bottom:auto;">
|
||||
<h1>
|
||||
<button class="back_link btn btn-inverse" style="margin-right: 5px;">
|
||||
<
|
||||
<div class="PNB" style="width:220px;">
|
||||
<div style="padding:10px">
|
||||
<a class="back_link btn push-back-link" style="margin-right:5px;margin-top:5px;">
|
||||
{% if context == 'Push' %}
|
||||
{{ 'Back to Push' | trans }}
|
||||
<img src="/assets/common/images/icons/chevron-left-white.png" class="image-normal">
|
||||
<img src="/assets/common/images/icons/chevron-left-blue.png" class="image-hover">
|
||||
<span>{{ 'Back to Push' | trans }}</span>
|
||||
{% else %}
|
||||
{{ 'Back to Feedback' | trans }}
|
||||
<img src="/assets/common/images/icons/chevron-left-white.png" class="image-normal">
|
||||
<img src="/assets/common/images/icons/chevron-left-green.png" class="image-hover">
|
||||
<span>{{ 'Back to Feedback' | trans }}</span>
|
||||
{% endif %}
|
||||
</button>
|
||||
<span class="title">
|
||||
{{ 'List Manager' | trans }}
|
||||
</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="PNB" style="top:50px;">
|
||||
<div class="PNB" style="width:320px;right:auto;">
|
||||
<div class="PNB10 content all-lists LeftColumn">
|
||||
{% include 'prod/actions/Feedback/lists-all.html.twig' %}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="editor PNB" style="left:320px;">
|
||||
<div class="welcome">
|
||||
<h1>{{ 'Welcome to the ListManager !' | trans }}</h1>
|
||||
{% if lists|length == 0 %}
|
||||
<p class="welcome">
|
||||
{{ 'Start by creating one by using the "add" button on the left !' | trans }}
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="welcome">
|
||||
{{ 'Select a list on the left and edit it !' | trans }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<div class="PNB10 all-lists LeftColumn" style="top:55px;">
|
||||
{% include 'prod/actions/Feedback/lists-all.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="PNB" style="left:220px;">
|
||||
<div class="editor PNB">
|
||||
<div class="PNB" style="top: 45px;">
|
||||
<div class="PNB10 content user_content grey-bg">
|
||||
<div class="welcome">
|
||||
<h1>{{ 'Welcome to the ListManager !' | trans }}</h1>
|
||||
{% if lists|length == 0 %}
|
||||
<p class="welcome">
|
||||
{{ 'Start by creating one by using the "add" button on the left !' | trans }}
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="welcome">
|
||||
{{ 'Select a list on the left and edit it !' | trans }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|