Commit 0ada1ea9 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

UI Fix (organisation)

parent d0ee979d
Loading
Loading
Loading
Loading
Loading
+21 −7
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza
            }
        }

        return [
        $datas = [
            'id'          => $object->getId(),
            'code'        => $object->getCode() ? $object->getCode() : "",
            'shortname'   => $object->getShortName(),
@@ -128,15 +128,19 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza
            'persons_total'  => count($personsTotal),
//            'activities'  => array_values($activities),
            'activities_total'  => count($activities),
            //'projects'  => array_values($projects),
//            //'projects'  => array_values($projects),
            'projects_total'  => count($projects),
            'connectors'  => $connectors,
            'suborganizations'  => $subOrganizations,
            'activities'  => $activities,
            'connectors'  => $connectors,
//            'activities'  => $activities,
//            'connectors'  => $connectors,
            'codepic'     => $object->getCodepic(),
            'codenaf'     => $object->getCodenaf(),
        ];
//        echo "<pre>";
//        die(json_encode($datas, JSON_PRETTY_PRINT));

        return $datas;
    }

    public function getFieldsSearchedWeighted(string $search): array
@@ -233,11 +237,21 @@ class OrganizationElasticSearch extends ElasticSearchEngine implements IOrganiza
                    'close' => ['type' => 'boolean'],
                    'dateClose' => ['type' => 'date', 'format' => 'Y-m-d'],
                    'zipcode' => ['type' => 'text', 'analyzer' => 'folding_analyzer'],
                    'persons' => ['type' => 'object'],
                    'persons' => [
                        'type' => 'nested',
                        'properties' => [
                            'id' => ['type' => 'integer'],
                            'firstname' => ['type' => 'text', 'analyzer' => 'folding_analyzer'],
                            'lastname' => ['type' => 'text', 'analyzer' => 'folding_analyzer'],
                            'role' => ['type' => 'keyword'],
                            'primary' => ['type' => 'boolean'],
                            'dateend' => ['type' => 'date', 'format' => 'yyyy-MM-dd HH:mm:ss'],
                        ]
                    ],
                    'persons_total' => ['type' => 'long'],
                    'activities' => ['type' => 'object'],
                    //'activities' => ['type' => 'object'],
                    'activities_total' => ['type' => 'long'],
                    'projects' => ['type' => 'object'],
                    //'projects' => ['type' => 'object'],
                    'projects_total' => ['type' => 'long'],
                    'suborganizations' => ['type' => 'object'],
                ]
+25 −16
Original line number Diff line number Diff line
@@ -3,30 +3,35 @@
    <div class="breadcrumbs">
        <a href="javascript:history.back()" class="link">Retour</a>
    </div>
    <header class="header jumbotron organization type-<?= $organization->getTypeSlug() ?>">
    <header class="header">
        <?php if(count($ancestors)): ?>
        <h3>
            <small style="display: block">Structure référente</small>
            <span class="chain-values">
                <i class="icon-fork"></i>
                <?php foreach ($ancestors as $a): ?>
                <span class="ancestor">
                    <i class="icon-angle-right"></i>
                    <span class="element">
                        <a href="<?= $this->url('organization/show', ['id' => $a->getId()]) ?>">
                            <?= $a ?>
                        </a>
                    </span>
                <?php endforeach; ?>
            </span>
        </h3>
        <?php endif; ?>
        <h1>
            <?php if( $organization->getCode() ): ?>
                <abbr><?= $organization->getCode() ?></abbr>
                <code><?= $organization->getCode() ?></code>
            <?php endif; ?>
            <i class="icon-building-filled"></i>
            <strong>
                <?= $organization->getShortName() ? $organization->getShortName().', ' : '' ?>
            </strong>
            <em>
                <?= $organization->getFullname() ?>
            </em>

            <?php if( $organization->getTypeObj() ):?>
            <sup><small> (<?= $organization->getTypeObj() ?>)</small></sup>
            <span class="on-right cartouche cartouche-secondary"><?= $organization->getTypeObj() ?></span>
            <?php endif;?>
        </h1>
        <div class="details row">
@@ -106,14 +111,14 @@
                </dd>
            </dl>
            <div class="col-md-4">
                <h5>Description</h5>
                <?= $organization->getDescription() ? $organization->getDescription() : '<i class="missing-data">Aucun</i>' ?>
                <dl>
                    <dt>Description</dt>
                    <dd><?= $organization->getDescription() ? $organization->getDescription() : '<i class="missing-data">Aucune</i>' ?></dd>
                </dl>

                <h5>Synchronisation</h5>
                <dl>
                    <dt>CONNECTOR</dt>
                    <dt>Synchronisation</dt>
                    <dd>

                        <ul>
                            <?php foreach($connectors as $connector): ?>

@@ -133,11 +138,14 @@

                            <?php endforeach; ?>
                        </ul>

                    </dd>
                </dl>
            </div>


        </div>
        <nav>
        <div class="bg-white text-center">
            <nav class="btn-group inline-block">
                <a href="<?= $this->url('organization/edit', array('id' => $organization->getId())) ?>" class="btn btn-light btn-sm">
                    Éditer les informations
                </a>
@@ -146,8 +154,9 @@
                    Réindexer
                </a>

            <a href="<?= $this->url('timesheet/organization') ?>?id=<?= $organization->getId() ?>" class="btn btn-primary">Déclarations en attente</a>
                <a href="<?= $this->url('timesheet/organization') ?>?id=<?= $organization->getId() ?>" class="btn btn-primary btn-sm">Déclarations en attente</a>
            </nav>
        </div>

    </header>
    <section class="content">
@@ -197,7 +206,7 @@




<!--
        <h2>Projet <span class="label <?= count($projects)>0?'label-info':'label-default' ?>"><?= count($projects) ?></span></h2>
        <?php foreach($projects as $project): ?>
            <?= $this->partial('/oscar/project/project-item-openable.phtml', array(
@@ -266,4 +275,4 @@
        })
    </script>
</div>
-->
+3 −1
Original line number Diff line number Diff line
@@ -61,7 +61,9 @@ $person = $enroll->getPerson();
            <?php endif; ?>
        <?php endif; ?>

        <a href="<?= $this->url('person/show', ['id' => $person->getId()]) ?>" class="btn btn-xs btn-primary"><i class="icon-zoom-in-outline"></i> Fiche</a>
        <a href="<?= $this->url('person/show', ['id' => $person->getId()]) ?>" class="btn btn-sm btn-primary">
            <i class="icon-zoom-in-outline"></i> Fiche
        </a>

    </div>

+2 −1
Original line number Diff line number Diff line
@@ -107,8 +107,9 @@ h1 {

h2 {
  margin-top: 1em;
  font-weight: 600;
  font-weight: 500;
  color: $secondary-grey;
  font-size: 1.4em;
}

h3 {
+31 −0
Original line number Diff line number Diff line
@@ -106,6 +106,37 @@ header.home {
  }
}

header.header {
  h1 {
    margin: 0;
    font-size: 2em;
    code {
      background: var(--bs-secondary-white);
      padding: 0 .25em;
      margin: auto .25em;
    }
    em { font-weight: 400; }
    border-bottom: solid thin var(--bs-primary-white);
    border-top: solid thin var(--bs-primary-white);
    background: var(--bs-white);
  }

  h3{
    margin: 0;
  }

  .details {
    padding: 1em;
    margin: 0;
    background: var(--bs-white);
  }

  dl {
    dt { color: $primary-grey; font-weight: 200; font-size: .8em; line-height: 1em }
    dd { color: $primary; font-weight: 600; font-size: 1em; margin: 0}
  }
}

.section-home-access .btn {
  margin: .3em;
}
 No newline at end of file
Loading