Loading front/src/ActivitySearchItem.vue +66 −37 Original line number Diff line number Diff line Loading @@ -6,19 +6,15 @@ <span class="text">{{ activity.statut }}</span> </span> <small>{{ activity.typeOscar }} </small> <span> <a :href="'/activites-de-recherche/fiche-detaillee/' + activity.id"> <strong class="text-light" v-if="activity.projectacronym">[{{ activity.projectacronym }}] / </strong> <strong>{{ activity.numOscar }}</strong> : {{ activity.label }} </a> <a :href="'/activites-de-recherche/fiche-detaillee/' + activity.id" class="more">Fiche</a> <span v-if="activity.has_workpackages" class="cartouche blue xs"> <i class="icon-calendar"></i> Soumis aux feuille de temps </span> <!--<a data-confirm="Supprimer définitivement cette activité ?" data-href="/activites-de-recherche/delete/10609" class="del">Supprimer</a>--> </span> Loading @@ -31,21 +27,31 @@ </h3> <div class="card-content"> <div class="row metas"> <div class="col-md-12"> <span class="number"> <small class="key number-label">N°OSCAR</small> <strong class="value number-value"> {{ activity.numOscar }} </strong> </span> <span class="number"> <span class="number" v-if="activity.PFI"> <small class="key number-label">PFI</small> <strong class="value number-value"> {{ activity.PFI }} </strong> </span> <span class="number" v-for="value,key in activity.numbers"> <small class="key number-label">{{ key }}</small> <strong class="value number-value"> {{ value }} </strong> </span> <span v-if="activity.has_workpackages" class="cartouche secondary1"> <i class="icon-calendar"></i> Soumis aux feuille de temps </span> </div> <div class="col-sm-12"> Signature : <strong v-if="activity.dateSigned">{{ activity.dateSigned | fullDate }}</strong> <strong v-else>Non signé</strong> ~ <span v-if="activity.dateStart || activity.dateEnd"> Active <span v-if="activity.dateStart"> Loading @@ -56,7 +62,7 @@ au <time>{{ activity.dateEnd | fullDate }}</time> </span> </span> <br> Créé le <time>{{ activity.dateCreated | fullDate }}</time> Dernière mise à jour : Loading @@ -67,7 +73,10 @@ <div class="col-sm-6"> <div v-for="persons, role in activity.persons_primary"> <i :class="'icon-' + role | slugify"></i>{{ role }} : <a v-for="person in persons" :href="'/person/show/' +person.id" class="person" :title="person.affectation"> <a v-for="person in persons" :href="person.url" @click="handlerClickPerson($event, person)" :class="{'unclickable': !person.url}" class="person" :title="person.affectation"> <i :class="'icon-' + (person.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ person.displayName }} </a> Loading @@ -77,8 +86,9 @@ <div class="col-sm-6"> <div v-for="organizations, role in activity.organizations_primary"> <i :class="'icon-' + role | slugify"></i>{{ role }} : <a v-for="organization in organizations" :href="'/organization/show/' +organization.id" class="organization"> <a v-for="organization in organizations" :href="organization.url" class="organization" @click="handlerClickOrganization($event, organization)" :class="{'unclickable': !organization.url}"> <i :class="'icon-' + (organization.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ organization.displayName }} </a> Loading @@ -89,22 +99,29 @@ <p class="text-highlight" v-if="activity.persons && !compact"> <i class="icon-user grey"></i>Membres : <span v-for="persons, role in activity.persons"> <span v-for="person in persons" class="person cartouche xs" :title="person.affectation"> <a v-for="person in persons" class="person cartouche xs" :title="person.affectation" :href="person.url" @click="handlerClickPerson($event, person)" :class="{'unclickable': !person.url}" > <i :class="'icon-' + (person.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ person.displayName }} <span class="addon">{{ role }}</span> </span> </a> </span> </p> <p class="text-highlight" v-if="activity.organizations && !compact"> <i class="icon-building-filled grey"></i>Partenaires : <span v-for="organizations, role in activity.organizations"> <span v-for="organization in organizations" class="organization cartouche xs"> <a v-for="organization in organizations" class="organization cartouche xs" @click="handlerClickOrganization($event, organization)" :href="organization.url" :class="{'unclickable': !organization.url}"> <i :class="'icon-' + (organization.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ organization.displayName }} <span class="addon">{{ role }}</span> </span> </a> </span> </p> Loading @@ -124,12 +141,24 @@ export default { props: { activity: {required: true}, compact: {type: Boolean, default: false} compact: {type: Boolean, default: false}, person_url: {type: Boolean, default: true}, organization_url: {type: Boolean, default: false} }, methods: { handlerDebug(dt){ console.log(dt); this.$emit('debug', dt); }, handlerClickPerson(evt, person){ if( !person.url ){ evt.preventDefault(); } }, handlerClickOrganization(evt, organization){ if( !organization.url ){ evt.preventDefault(); } } } } Loading front/src/ActivitySearchUi.vue +1 −1 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ export default { totalResultQuery: 0, previous: null, activities: [], ui_vuecompact: true, ui_vuecompact: false, filters_obj: [], selecting_filter: "", debug: '' Loading module/Oscar/src/Oscar/Formatter/JSONFormatter.php +12 −0 Original line number Diff line number Diff line Loading @@ -90,12 +90,21 @@ class JSONFormatter $datas['project_id'] = $activity->getProject()?$activity->getProject()->getId():null; $datas['statutId'] = $activity->getStatus(); $datas['person_url'] = $this->getOscarUserContext()->hasPrivileges(Privileges::PERSON_SHOW); $datas['organizations_url'] = $this->getOscarUserContext()->hasPrivileges(Privileges::ORGANIZATION_SHOW); $datas['persons'] = null; $datas['persons_primary'] = null; $datas['has_workpackages'] = count($activity->getWorkPackages()) > 0; $datas['numbers'] = []; foreach($activity->getNumbers() as $key=>$value){ $datas['numbers'][$key] = $value; } if( $this->getOscarUserContext()->hasPrivileges(Privileges::ACTIVITY_PERSON_SHOW, $activity) ) { $person_url = $this->getOscarUserContext()->hasPrivileges(Privileges::PERSON_SHOW); $datas['persons'] = []; $datas['persons_primary'] = []; Loading @@ -111,6 +120,7 @@ class JSONFormatter 'affectation' => $activityPerson->getPerson()->getLdapAffectation(), 'location' => $activityPerson->getPerson()->getLdapSiteLocation(), 'end' => $this->formatDateISO($activityPerson->getDateEnd()), 'url' => $person_url ? '/person/show/'.$activityPerson->getPerson()->getId() : false, 'spot' => get_class($activityPerson) == ActivityPerson::class ? 'activity' : 'project' ]; Loading @@ -136,6 +146,7 @@ class JSONFormatter if( $this->getOscarUserContext()->hasPrivileges(Privileges::ACTIVITY_ORGANIZATION_SHOW, $activity) ) { $organization_url = $this->getOscarUserContext()->hasPrivileges(Privileges::ORGANIZATION_SHOW); $datas['organizations'] = []; $datas['organizations_primary'] = []; Loading @@ -149,6 +160,7 @@ class JSONFormatter // 'email' => $activityOrganization->getOrganization()->getEmail(), 'start' => $this->formatDateISO($activityOrganization->getDateStart()), 'end' => $this->formatDateISO($activityOrganization->getDateEnd()), 'url' => $organization_url ? '/organization/show/'.$activityOrganization->getOrganization()->getId() : false, 'spot' => get_class($activityOrganization) == ActivityOrganization::class ? 'activity' : 'project' ]; Loading module/Oscar/view/oscar/project-grant/show.phtml +4 −4 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ <h1> <span> <i class="icon-cube"></i> <?= $entity->getLabel() ?></span> <?php if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_PAYMENT_SHOW)): ?> if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_PAYMENT_SHOW, $entity)): ?> <div class="budget"> <em>Montant</em> <strong><?= $this->currency($entity) ?></strong> Loading Loading @@ -200,7 +200,7 @@ <div class="col-md-8"> <?php if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_ORGANIZATION_SHOW, $entity)): ?> if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_PERSON_SHOW, $entity)): ?> <section class="has-btn"> <h2> <i class="icon-group"></i> Loading @@ -217,7 +217,7 @@ new Vue({ el: "#membres", render(h) { return h(EntityWithRole, { return h(EntityWithRole.default, { props: { url: "<?= $this->url('contract/persons', ['id' => $entity->getId()]) ?>", urlNew: "<?= $this->url( Loading Loading @@ -310,7 +310,7 @@ new Vue({ el: "#organizations", render(h) { return h(EntityWithRole, { return h(EntityWithRole.default, { props: { url: "<?= $this->url('contract/organizations', ['id' => $entity->getId()]) ?>", urlNew: "<?= $this->url( Loading public/css/_common.scss +21 −6 Original line number Diff line number Diff line Loading @@ -896,9 +896,9 @@ $colorDefault: $colorMedium; } .metas { font-size: .8em; font-size: .9em; font-weight: 100; color: lighten($brand-primary, 30%); color: lighten($brand-primary, 10%); border-bottom-width: thin; border-bottom-style: solid; border-color: #f2f2f2; Loading Loading @@ -1508,6 +1508,19 @@ $text-small: 12px; color: #fff; } .metas .person, .metas .organization, a.person.cartouche, a.organization.cartouche { &.unclickable { cursor: default; text-decoration: none; &:hover { cursor: default; text-decoration: none; } } } .versions { .opener { cursor: pointer; Loading Loading @@ -2045,7 +2058,7 @@ $cardBorderSeparatorLnf: solid lighten($cardColorText, 50%) thin; font-size: 1.25em; display: flex; align-content: center; align-items: flex-start; align-items: center; justify-content: flex-start; flex-flow: row; Loading @@ -2057,7 +2070,7 @@ $cardBorderSeparatorLnf: solid lighten($cardColorText, 50%) thin; flex: auto 0; } small { flex: 15% 0; flex: 10% 0; } abbr { flex: 5% 0; Loading Loading @@ -4340,18 +4353,20 @@ time.date-missing { background: $colorGreyLight; border-radius: 2px; font-weight: 100; text-shadow: -1px 1px 0 rgba(0, 0, 0, .2); padding: 0 .3em; padding: 0 .5em; margin-right: 1em; box-shadow: 0 0 .5em rgba(0, 0, 0, .1); font-size: 1.2em; .key { color: white; text-shadow: -1px 1px 1px rgba(0, 0, 0, .7); &:after { content: " / "; } } .value { color: $colorDark; text-shadow: none; font-weight: 700; } } Loading Loading
front/src/ActivitySearchItem.vue +66 −37 Original line number Diff line number Diff line Loading @@ -6,19 +6,15 @@ <span class="text">{{ activity.statut }}</span> </span> <small>{{ activity.typeOscar }} </small> <span> <a :href="'/activites-de-recherche/fiche-detaillee/' + activity.id"> <strong class="text-light" v-if="activity.projectacronym">[{{ activity.projectacronym }}] / </strong> <strong>{{ activity.numOscar }}</strong> : {{ activity.label }} </a> <a :href="'/activites-de-recherche/fiche-detaillee/' + activity.id" class="more">Fiche</a> <span v-if="activity.has_workpackages" class="cartouche blue xs"> <i class="icon-calendar"></i> Soumis aux feuille de temps </span> <!--<a data-confirm="Supprimer définitivement cette activité ?" data-href="/activites-de-recherche/delete/10609" class="del">Supprimer</a>--> </span> Loading @@ -31,21 +27,31 @@ </h3> <div class="card-content"> <div class="row metas"> <div class="col-md-12"> <span class="number"> <small class="key number-label">N°OSCAR</small> <strong class="value number-value"> {{ activity.numOscar }} </strong> </span> <span class="number"> <span class="number" v-if="activity.PFI"> <small class="key number-label">PFI</small> <strong class="value number-value"> {{ activity.PFI }} </strong> </span> <span class="number" v-for="value,key in activity.numbers"> <small class="key number-label">{{ key }}</small> <strong class="value number-value"> {{ value }} </strong> </span> <span v-if="activity.has_workpackages" class="cartouche secondary1"> <i class="icon-calendar"></i> Soumis aux feuille de temps </span> </div> <div class="col-sm-12"> Signature : <strong v-if="activity.dateSigned">{{ activity.dateSigned | fullDate }}</strong> <strong v-else>Non signé</strong> ~ <span v-if="activity.dateStart || activity.dateEnd"> Active <span v-if="activity.dateStart"> Loading @@ -56,7 +62,7 @@ au <time>{{ activity.dateEnd | fullDate }}</time> </span> </span> <br> Créé le <time>{{ activity.dateCreated | fullDate }}</time> Dernière mise à jour : Loading @@ -67,7 +73,10 @@ <div class="col-sm-6"> <div v-for="persons, role in activity.persons_primary"> <i :class="'icon-' + role | slugify"></i>{{ role }} : <a v-for="person in persons" :href="'/person/show/' +person.id" class="person" :title="person.affectation"> <a v-for="person in persons" :href="person.url" @click="handlerClickPerson($event, person)" :class="{'unclickable': !person.url}" class="person" :title="person.affectation"> <i :class="'icon-' + (person.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ person.displayName }} </a> Loading @@ -77,8 +86,9 @@ <div class="col-sm-6"> <div v-for="organizations, role in activity.organizations_primary"> <i :class="'icon-' + role | slugify"></i>{{ role }} : <a v-for="organization in organizations" :href="'/organization/show/' +organization.id" class="organization"> <a v-for="organization in organizations" :href="organization.url" class="organization" @click="handlerClickOrganization($event, organization)" :class="{'unclickable': !organization.url}"> <i :class="'icon-' + (organization.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ organization.displayName }} </a> Loading @@ -89,22 +99,29 @@ <p class="text-highlight" v-if="activity.persons && !compact"> <i class="icon-user grey"></i>Membres : <span v-for="persons, role in activity.persons"> <span v-for="person in persons" class="person cartouche xs" :title="person.affectation"> <a v-for="person in persons" class="person cartouche xs" :title="person.affectation" :href="person.url" @click="handlerClickPerson($event, person)" :class="{'unclickable': !person.url}" > <i :class="'icon-' + (person.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ person.displayName }} <span class="addon">{{ role }}</span> </span> </a> </span> </p> <p class="text-highlight" v-if="activity.organizations && !compact"> <i class="icon-building-filled grey"></i>Partenaires : <span v-for="organizations, role in activity.organizations"> <span v-for="organization in organizations" class="organization cartouche xs"> <a v-for="organization in organizations" class="organization cartouche xs" @click="handlerClickOrganization($event, organization)" :href="organization.url" :class="{'unclickable': !organization.url}"> <i :class="'icon-' + (organization.spot == 'activity' ? 'cube' : 'cubes')"></i> {{ organization.displayName }} <span class="addon">{{ role }}</span> </span> </a> </span> </p> Loading @@ -124,12 +141,24 @@ export default { props: { activity: {required: true}, compact: {type: Boolean, default: false} compact: {type: Boolean, default: false}, person_url: {type: Boolean, default: true}, organization_url: {type: Boolean, default: false} }, methods: { handlerDebug(dt){ console.log(dt); this.$emit('debug', dt); }, handlerClickPerson(evt, person){ if( !person.url ){ evt.preventDefault(); } }, handlerClickOrganization(evt, organization){ if( !organization.url ){ evt.preventDefault(); } } } } Loading
front/src/ActivitySearchUi.vue +1 −1 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ export default { totalResultQuery: 0, previous: null, activities: [], ui_vuecompact: true, ui_vuecompact: false, filters_obj: [], selecting_filter: "", debug: '' Loading
module/Oscar/src/Oscar/Formatter/JSONFormatter.php +12 −0 Original line number Diff line number Diff line Loading @@ -90,12 +90,21 @@ class JSONFormatter $datas['project_id'] = $activity->getProject()?$activity->getProject()->getId():null; $datas['statutId'] = $activity->getStatus(); $datas['person_url'] = $this->getOscarUserContext()->hasPrivileges(Privileges::PERSON_SHOW); $datas['organizations_url'] = $this->getOscarUserContext()->hasPrivileges(Privileges::ORGANIZATION_SHOW); $datas['persons'] = null; $datas['persons_primary'] = null; $datas['has_workpackages'] = count($activity->getWorkPackages()) > 0; $datas['numbers'] = []; foreach($activity->getNumbers() as $key=>$value){ $datas['numbers'][$key] = $value; } if( $this->getOscarUserContext()->hasPrivileges(Privileges::ACTIVITY_PERSON_SHOW, $activity) ) { $person_url = $this->getOscarUserContext()->hasPrivileges(Privileges::PERSON_SHOW); $datas['persons'] = []; $datas['persons_primary'] = []; Loading @@ -111,6 +120,7 @@ class JSONFormatter 'affectation' => $activityPerson->getPerson()->getLdapAffectation(), 'location' => $activityPerson->getPerson()->getLdapSiteLocation(), 'end' => $this->formatDateISO($activityPerson->getDateEnd()), 'url' => $person_url ? '/person/show/'.$activityPerson->getPerson()->getId() : false, 'spot' => get_class($activityPerson) == ActivityPerson::class ? 'activity' : 'project' ]; Loading @@ -136,6 +146,7 @@ class JSONFormatter if( $this->getOscarUserContext()->hasPrivileges(Privileges::ACTIVITY_ORGANIZATION_SHOW, $activity) ) { $organization_url = $this->getOscarUserContext()->hasPrivileges(Privileges::ORGANIZATION_SHOW); $datas['organizations'] = []; $datas['organizations_primary'] = []; Loading @@ -149,6 +160,7 @@ class JSONFormatter // 'email' => $activityOrganization->getOrganization()->getEmail(), 'start' => $this->formatDateISO($activityOrganization->getDateStart()), 'end' => $this->formatDateISO($activityOrganization->getDateEnd()), 'url' => $organization_url ? '/organization/show/'.$activityOrganization->getOrganization()->getId() : false, 'spot' => get_class($activityOrganization) == ActivityOrganization::class ? 'activity' : 'project' ]; Loading
module/Oscar/view/oscar/project-grant/show.phtml +4 −4 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ <h1> <span> <i class="icon-cube"></i> <?= $entity->getLabel() ?></span> <?php if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_PAYMENT_SHOW)): ?> if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_PAYMENT_SHOW, $entity)): ?> <div class="budget"> <em>Montant</em> <strong><?= $this->currency($entity) ?></strong> Loading Loading @@ -200,7 +200,7 @@ <div class="col-md-8"> <?php if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_ORGANIZATION_SHOW, $entity)): ?> if ($this->grant()->privilege(\Oscar\Provider\Privileges::ACTIVITY_PERSON_SHOW, $entity)): ?> <section class="has-btn"> <h2> <i class="icon-group"></i> Loading @@ -217,7 +217,7 @@ new Vue({ el: "#membres", render(h) { return h(EntityWithRole, { return h(EntityWithRole.default, { props: { url: "<?= $this->url('contract/persons', ['id' => $entity->getId()]) ?>", urlNew: "<?= $this->url( Loading Loading @@ -310,7 +310,7 @@ new Vue({ el: "#organizations", render(h) { return h(EntityWithRole, { return h(EntityWithRole.default, { props: { url: "<?= $this->url('contract/organizations', ['id' => $entity->getId()]) ?>", urlNew: "<?= $this->url( Loading
public/css/_common.scss +21 −6 Original line number Diff line number Diff line Loading @@ -896,9 +896,9 @@ $colorDefault: $colorMedium; } .metas { font-size: .8em; font-size: .9em; font-weight: 100; color: lighten($brand-primary, 30%); color: lighten($brand-primary, 10%); border-bottom-width: thin; border-bottom-style: solid; border-color: #f2f2f2; Loading Loading @@ -1508,6 +1508,19 @@ $text-small: 12px; color: #fff; } .metas .person, .metas .organization, a.person.cartouche, a.organization.cartouche { &.unclickable { cursor: default; text-decoration: none; &:hover { cursor: default; text-decoration: none; } } } .versions { .opener { cursor: pointer; Loading Loading @@ -2045,7 +2058,7 @@ $cardBorderSeparatorLnf: solid lighten($cardColorText, 50%) thin; font-size: 1.25em; display: flex; align-content: center; align-items: flex-start; align-items: center; justify-content: flex-start; flex-flow: row; Loading @@ -2057,7 +2070,7 @@ $cardBorderSeparatorLnf: solid lighten($cardColorText, 50%) thin; flex: auto 0; } small { flex: 15% 0; flex: 10% 0; } abbr { flex: 5% 0; Loading Loading @@ -4340,18 +4353,20 @@ time.date-missing { background: $colorGreyLight; border-radius: 2px; font-weight: 100; text-shadow: -1px 1px 0 rgba(0, 0, 0, .2); padding: 0 .3em; padding: 0 .5em; margin-right: 1em; box-shadow: 0 0 .5em rgba(0, 0, 0, .1); font-size: 1.2em; .key { color: white; text-shadow: -1px 1px 1px rgba(0, 0, 0, .7); &:after { content: " / "; } } .value { color: $colorDark; text-shadow: none; font-weight: 700; } } Loading