imio.smartweb.core 1.2.65__py3-none-any.whl → 1.2.67__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imio/smartweb/core/browser/controlpanel.py +41 -0
- imio/smartweb/core/browser/faceted/block_view.pt +4 -4
- imio/smartweb/core/browser/faceted/summary_view.pt +4 -4
- imio/smartweb/core/browser/static/smartweb-view-compiled.css +1 -1
- imio/smartweb/core/browser/static/src/view.less +4 -0
- imio/smartweb/core/contents/__init__.py +2 -0
- imio/smartweb/core/contents/configure.zcml +1 -0
- imio/smartweb/core/contents/folder/block_view.pt +8 -8
- imio/smartweb/core/contents/folder/summary_view.pt +4 -4
- imio/smartweb/core/contents/publication/__init__.py +0 -0
- imio/smartweb/core/contents/publication/configure.zcml +5 -0
- imio/smartweb/core/contents/publication/content.py +23 -0
- imio/smartweb/core/contents/rest/directory/view.pt +2 -1
- imio/smartweb/core/contents/rest/events/view.pt +2 -1
- imio/smartweb/core/contents/rest/news/view.pt +2 -1
- imio/smartweb/core/contents/rest/view.py +4 -0
- imio/smartweb/core/contents/sections/common_templates/table.pt +13 -3
- imio/smartweb/core/contents/sections/external_content/view.pt +1 -1
- imio/smartweb/core/contents/sections/files/content.py +7 -1
- imio/smartweb/core/contents/sections/files/view.py +38 -11
- imio/smartweb/core/contents/sections/views.py +19 -6
- imio/smartweb/core/profiles/default/metadata.xml +1 -1
- imio/smartweb/core/profiles/default/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/profiles/default/types/imio.smartweb.SectionFiles.xml +1 -0
- imio/smartweb/core/profiles/default/types.xml +1 -0
- imio/smartweb/core/subscribers.py +24 -0
- imio/smartweb/core/subscribers.zcml +4 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_institutions.json +60 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publication.json +105 -0
- imio/smartweb/core/tests/resources/json_iadeliberations_publications.json +270 -0
- imio/smartweb/core/tests/test_iadeliberations.py +136 -0
- imio/smartweb/core/tests/test_vocabularies.py +54 -0
- imio/smartweb/core/upgrades/configure.zcml +37 -1
- imio/smartweb/core/upgrades/profiles/1059_to_1060/registry/iadeliberation.xml +9 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.Publication.xml +38 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types/imio.smartweb.SectionFiles.xml +11 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/types.xml +4 -0
- imio/smartweb/core/upgrades/profiles/1060_to_1061/workflows.xml +6 -0
- imio/smartweb/core/utils.py +27 -0
- imio/smartweb/core/vocabularies.py +44 -0
- imio/smartweb/core/vocabularies.zcml +12 -0
- imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/js/373.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/486.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/{324.smartweb-webcomponents-compiled.js → 828.smartweb-webcomponents-compiled.js} +2 -2
- imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/919.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +12 -2
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +88 -60
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +27 -1
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +6 -2
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +69 -39
- imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +30 -3
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +10 -7
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +4 -2
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +3 -0
- imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +60 -48
- imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +30 -3
- imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +28 -7
- imio/smartweb/core/webcomponents/src/index.scss +188 -174
- {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/METADATA +27 -1
- {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/RECORD +70 -57
- /imio/smartweb/core/webcomponents/build/js/{324.smartweb-webcomponents-compiled.js.LICENSE.txt → 828.smartweb-webcomponents-compiled.js.LICENSE.txt} +0 -0
- /imio.smartweb.core-1.2.65-py3.10-nspkg.pth → /imio.smartweb.core-1.2.67-py3.10-nspkg.pth +0 -0
- {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/WHEEL +0 -0
- {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.65.dist-info → imio.smartweb.core-1.2.67.dist-info}/top_level.txt +0 -0
@@ -30,6 +30,7 @@ export default function Annuaire(props) {
|
|
30
30
|
proposeUrl={props.proposeUrl}
|
31
31
|
batchSize={props.batchSize}
|
32
32
|
displayMap={props.displayMap}
|
33
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
33
34
|
/>
|
34
35
|
</ScrollContext.Provider>
|
35
36
|
</Provider>
|
@@ -128,7 +129,12 @@ function AnnuaireView(props) {
|
|
128
129
|
let MapRender;
|
129
130
|
if (contactArray && contactArray.length > 0) {
|
130
131
|
listRender = (
|
131
|
-
<ContactList
|
132
|
+
<ContactList
|
133
|
+
onChange={clickID}
|
134
|
+
contactArray={contactArray}
|
135
|
+
onHover={hoverID}
|
136
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
137
|
+
/>
|
132
138
|
);
|
133
139
|
MapRender = (
|
134
140
|
<Map
|
@@ -259,7 +265,11 @@ function AnnuaireView(props) {
|
|
259
265
|
element={
|
260
266
|
<div className="r-wrapper container r-annuaire-wrapper">
|
261
267
|
<div className="r-result r-annuaire-result">
|
262
|
-
<ContactContent
|
268
|
+
<ContactContent
|
269
|
+
queryUrl={props.queryUrl}
|
270
|
+
onChange={clickID}
|
271
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
272
|
+
/>
|
263
273
|
</div>
|
264
274
|
{displayMap && (
|
265
275
|
<div
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
2
2
|
import { Translate } from "react-translated";
|
3
3
|
|
4
|
-
const ContactCard = ({ item }) => {
|
4
|
+
const ContactCard = ({ item, contextAuthenticatedUser }) => {
|
5
5
|
const [image, setImage] = useState(new Image());
|
6
6
|
const [imageClassName, setImageClassName] = useState("");
|
7
7
|
const title = item.title && item.title;
|
@@ -56,73 +56,101 @@ const ContactCard = ({ item }) => {
|
|
56
56
|
}, [item]);
|
57
57
|
|
58
58
|
return (
|
59
|
-
|
60
|
-
{
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
59
|
+
<>
|
60
|
+
{contextAuthenticatedUser === "False" ? (
|
61
|
+
<a
|
62
|
+
href={item["@id"]}
|
63
|
+
target="_blank"
|
64
|
+
title="Editer la fiche"
|
65
|
+
className="edit-rest-elements"
|
66
|
+
>
|
67
|
+
<svg
|
68
|
+
xmlns="http://www.w3.org/2000/svg"
|
69
|
+
width="16"
|
70
|
+
height="16"
|
71
|
+
fill="currentColor"
|
72
|
+
class="bi bi-pencil-square"
|
73
|
+
viewBox="0 0 16 16"
|
74
|
+
>
|
75
|
+
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
|
76
|
+
<path
|
77
|
+
fill-rule="evenodd"
|
78
|
+
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"
|
66
79
|
/>
|
67
|
-
|
68
|
-
|
69
|
-
src={image.src}
|
70
|
-
alt=""
|
71
|
-
/>
|
72
|
-
</div>
|
73
|
-
</>
|
80
|
+
</svg>
|
81
|
+
</a>
|
74
82
|
) : (
|
75
|
-
|
76
|
-
<div className="r-item-img r-item-img-placeholder"></div>
|
77
|
-
</>
|
83
|
+
""
|
78
84
|
)}
|
79
|
-
|
80
|
-
|
81
|
-
{
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
<Translate text="Itinéraire" />
|
94
|
-
</a>
|
95
|
-
</div>
|
96
|
-
</div>
|
97
|
-
) : (
|
98
|
-
""
|
99
|
-
)}
|
100
|
-
<div className="r-item-contact">
|
101
|
-
<div className="phones">
|
102
|
-
{phones
|
103
|
-
? phones.map((phone, i) => {
|
104
|
-
return <span key={i}>{phone.number}</span>;
|
105
|
-
})
|
106
|
-
: ""}
|
107
|
-
</div>
|
108
|
-
<div className="mails">
|
109
|
-
{mails
|
110
|
-
? mails.map((mail, i) => {
|
111
|
-
return <span key={i}>{mail.mail_address}</span>;
|
112
|
-
})
|
113
|
-
: ""}
|
85
|
+
|
86
|
+
<div className="r-list-item">
|
87
|
+
{image && image.src ? (
|
88
|
+
<>
|
89
|
+
<div className="r-item-img">
|
90
|
+
<div
|
91
|
+
className="r-content-figure-blur"
|
92
|
+
style={{ backgroundImage: "url(" + image.src + ")" }}
|
93
|
+
/>
|
94
|
+
<img
|
95
|
+
className={"r-content-figure-img" + " " + imageClassName}
|
96
|
+
src={image.src}
|
97
|
+
alt=""
|
98
|
+
/>
|
114
99
|
</div>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
100
|
+
</>
|
101
|
+
) : (
|
102
|
+
<>
|
103
|
+
<div className="r-item-img r-item-img-placeholder"></div>
|
104
|
+
</>
|
105
|
+
)}
|
106
|
+
<div className="r-item-text">
|
107
|
+
<span className="r-item-title">{title}</span>
|
108
|
+
{category ? <span className="r-item-categorie">{category.title}</span> : ""}
|
109
|
+
<div className="r-item-all">
|
110
|
+
{street ? (
|
111
|
+
<div className="r-item-adresse">
|
112
|
+
{number ? <span>{number + " "}</span> : ""}
|
113
|
+
{street ? <span>{street + ", "}</span> : ""}
|
114
|
+
{complement ? <span>{complement + ", "}</span> : ""}
|
115
|
+
<br />
|
116
|
+
{zipcode ? <span>{zipcode + " "}</span> : ""}
|
117
|
+
{city ? <span>{city}</span> : ""}
|
118
|
+
<div className="itineraty">
|
119
|
+
<a href={itineraryLink} target="_blank" rel="noreferrer">
|
120
|
+
<Translate text="Itinéraire" />
|
121
|
+
</a>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
) : (
|
125
|
+
""
|
126
|
+
)}
|
127
|
+
<div className="r-item-contact">
|
128
|
+
<div className="phones">
|
129
|
+
{phones
|
130
|
+
? phones.map((phone, i) => {
|
131
|
+
return <span key={i}>{phone.number}</span>;
|
132
|
+
})
|
133
|
+
: ""}
|
134
|
+
</div>
|
135
|
+
<div className="mails">
|
136
|
+
{mails
|
137
|
+
? mails.map((mail, i) => {
|
138
|
+
return <span key={i}>{mail.mail_address}</span>;
|
139
|
+
})
|
140
|
+
: ""}
|
141
|
+
</div>
|
142
|
+
<div className="topics">
|
143
|
+
{topics
|
144
|
+
? topics.slice(0, 3).map((mail, i) => {
|
145
|
+
return <span key={i}>{mail.title}</span>;
|
146
|
+
})
|
147
|
+
: ""}
|
148
|
+
</div>
|
121
149
|
</div>
|
122
150
|
</div>
|
123
151
|
</div>
|
124
152
|
</div>
|
125
|
-
|
153
|
+
</>
|
126
154
|
);
|
127
155
|
};
|
128
156
|
|
@@ -8,7 +8,7 @@ import "../../../../node_modules/flexbin/flexbin.css";
|
|
8
8
|
import { Translate } from "react-translated";
|
9
9
|
import queryString from "query-string";
|
10
10
|
|
11
|
-
const ContactContent = ({ queryUrl, onChange }) => {
|
11
|
+
const ContactContent = ({ queryUrl, onChange, contextAuthenticatedUser }) => {
|
12
12
|
const navigate = useNavigate();
|
13
13
|
const { u, ...parsed } = Object.assign({
|
14
14
|
UID: queryString.parse(useFilterQuery().toString())["u"],
|
@@ -103,6 +103,32 @@ const ContactContent = ({ queryUrl, onChange }) => {
|
|
103
103
|
<button type="button" onClick={handleClick}>
|
104
104
|
<Translate text="Retour" />
|
105
105
|
</button>
|
106
|
+
|
107
|
+
{contextAuthenticatedUser === "False" ? (
|
108
|
+
<a
|
109
|
+
href={item["@id"]}
|
110
|
+
target="_blank"
|
111
|
+
title="Editer la fiche"
|
112
|
+
className="edit-rest-elements edit-rest-elements-content"
|
113
|
+
>
|
114
|
+
<svg
|
115
|
+
xmlns="http://www.w3.org/2000/svg"
|
116
|
+
width="16"
|
117
|
+
height="16"
|
118
|
+
fill="currentColor"
|
119
|
+
class="bi bi-pencil-square"
|
120
|
+
viewBox="0 0 16 16"
|
121
|
+
>
|
122
|
+
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
|
123
|
+
<path
|
124
|
+
fill-rule="evenodd"
|
125
|
+
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"
|
126
|
+
/>
|
127
|
+
</svg>
|
128
|
+
</a>
|
129
|
+
) : (
|
130
|
+
""
|
131
|
+
)}
|
106
132
|
<article>
|
107
133
|
<header>
|
108
134
|
<h2 className="r-content-title">{item.title}</h2>
|
@@ -3,7 +3,7 @@ import ContactCard from "../ContactCard/ContactCard";
|
|
3
3
|
import { Link } from "react-router-dom";
|
4
4
|
import removeAccents from "remove-accents";
|
5
5
|
import { ScrollContext } from "../../../hooks/ScrollContext";
|
6
|
-
const ContactList = ({ contactArray, onChange, onHover,
|
6
|
+
const ContactList = ({ contactArray, onChange, onHover, contextAuthenticatedUser }) => {
|
7
7
|
const { scrollPos, updateScrollPos } = useContext(ScrollContext);
|
8
8
|
|
9
9
|
function handleClick(event) {
|
@@ -45,7 +45,11 @@ const ContactList = ({ contactArray, onChange, onHover, parentCallback }) => {
|
|
45
45
|
},
|
46
46
|
}}
|
47
47
|
></Link>
|
48
|
-
<ContactCard
|
48
|
+
<ContactCard
|
49
|
+
item={item}
|
50
|
+
contextAuthenticatedUser={contextAuthenticatedUser}
|
51
|
+
key={item.created}
|
52
|
+
/>
|
49
53
|
</li>
|
50
54
|
))}
|
51
55
|
</ul>
|
@@ -2,54 +2,84 @@ import React from "react";
|
|
2
2
|
import moment from "moment";
|
3
3
|
import { Translate } from "react-translated";
|
4
4
|
|
5
|
-
const ContactCard = ({ item, showCategoriesOrTopics }) => {
|
5
|
+
const ContactCard = ({ item, showCategoriesOrTopics, contextAuthenticatedUser }) => {
|
6
6
|
moment.locale("be");
|
7
7
|
const title = item.title && item.title;
|
8
8
|
const start = moment.utc(item.start).format("DD-MM-YYYY");
|
9
9
|
const end = moment.utc(item.end).format("DD-MM-YYYY");
|
10
10
|
return (
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
item
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
<>
|
12
|
+
{contextAuthenticatedUser === "False" ? (
|
13
|
+
<a
|
14
|
+
href={item["@id"]}
|
15
|
+
target="_blank"
|
16
|
+
title="Editer la fiche"
|
17
|
+
className="edit-rest-elements"
|
18
|
+
>
|
19
|
+
<svg
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
21
|
+
width="16"
|
22
|
+
height="16"
|
23
|
+
fill="currentColor"
|
24
|
+
class="bi bi-pencil-square"
|
25
|
+
viewBox="0 0 16 16"
|
26
|
+
>
|
27
|
+
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
|
28
|
+
<path
|
29
|
+
fill-rule="evenodd"
|
30
|
+
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"
|
31
|
+
/>
|
32
|
+
</svg>
|
33
|
+
</a>
|
34
|
+
) : (
|
35
|
+
""
|
36
|
+
)}
|
37
|
+
<div className="r-list-item">
|
38
|
+
<div
|
39
|
+
className={
|
40
|
+
item.image_vignette_scale
|
41
|
+
? "r-item-img"
|
42
|
+
: "r-item-img r-item-img-placeholder"
|
43
|
+
}
|
44
|
+
style={{
|
45
|
+
backgroundImage: item.image_vignette_scale
|
46
|
+
? "url(" + item.image_vignette_scale + ")"
|
47
|
+
: "",
|
48
|
+
}}
|
49
|
+
/>
|
22
50
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
51
|
+
<div className="r-item-text">
|
52
|
+
{start && (
|
53
|
+
<span className="r-item-date">
|
54
|
+
{start === end ? (
|
55
|
+
start
|
56
|
+
) : (
|
57
|
+
<>
|
58
|
+
{start} <Translate text="au" /> {end}
|
59
|
+
</>
|
60
|
+
)}
|
61
|
+
</span>
|
62
|
+
)}
|
63
|
+
<span className="r-item-title">{title}</span>
|
64
|
+
{showCategoriesOrTopics === "topic" ? (
|
65
|
+
item.topics &&
|
66
|
+
item.topics[0] && (
|
67
|
+
<span className="r-item-categorie">{item.topics[0].title}</span>
|
68
|
+
)
|
69
|
+
) : showCategoriesOrTopics === "category" ? (
|
70
|
+
item.local_category ? (
|
71
|
+
<span className="r-item-categorie">{item.local_category.title}</span>
|
28
72
|
) : (
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
)}
|
33
|
-
</span>
|
34
|
-
)}
|
35
|
-
<span className="r-item-title">{title}</span>
|
36
|
-
{showCategoriesOrTopics === "topic" ? (
|
37
|
-
item.topics && item.topics[0] && (
|
38
|
-
<span className="r-item-categorie">{item.topics[0].title}</span>
|
39
|
-
)
|
40
|
-
) : showCategoriesOrTopics === "category" ? (
|
41
|
-
item.local_category ? (
|
42
|
-
<span className="r-item-categorie">{item.local_category.title}</span>
|
43
|
-
) : (
|
44
|
-
item.category && (
|
45
|
-
<span className="r-item-categorie">{item.category.title}</span>
|
73
|
+
item.category && (
|
74
|
+
<span className="r-item-categorie">{item.category.title}</span>
|
75
|
+
)
|
46
76
|
)
|
47
|
-
)
|
48
|
-
|
49
|
-
|
50
|
-
|
77
|
+
) : (
|
78
|
+
""
|
79
|
+
)}
|
80
|
+
</div>
|
51
81
|
</div>
|
52
|
-
|
82
|
+
</>
|
53
83
|
);
|
54
84
|
};
|
55
85
|
|
@@ -9,7 +9,7 @@ import "../../../../node_modules/flexbin/flexbin.css";
|
|
9
9
|
import { Translate } from "react-translated";
|
10
10
|
import queryString from "query-string";
|
11
11
|
|
12
|
-
const ContactContent = ({ queryUrl, onChange, onlyPastEvents }) => {
|
12
|
+
const ContactContent = ({ queryUrl, onChange, onlyPastEvents, contextAuthenticatedUser }) => {
|
13
13
|
let navigate = useNavigate();
|
14
14
|
const { u, ...parsed } = Object.assign({
|
15
15
|
UID: queryString.parse(useFilterQuery().toString())["u"],
|
@@ -59,8 +59,8 @@ const ContactContent = ({ queryUrl, onChange, onlyPastEvents }) => {
|
|
59
59
|
window.scrollTo({
|
60
60
|
top: 0,
|
61
61
|
left: 0,
|
62
|
-
behavior:
|
63
|
-
|
62
|
+
behavior: "instant",
|
63
|
+
});
|
64
64
|
}, [response]);
|
65
65
|
/// use to set file and gallery items
|
66
66
|
useEffect(() => {
|
@@ -126,6 +126,33 @@ const ContactContent = ({ queryUrl, onChange, onlyPastEvents }) => {
|
|
126
126
|
<button type="button" onClick={handleClick}>
|
127
127
|
<Translate text="Retour" />
|
128
128
|
</button>
|
129
|
+
|
130
|
+
{contextAuthenticatedUser === "False" ? (
|
131
|
+
<a
|
132
|
+
href={item["@id"]}
|
133
|
+
target="_blank"
|
134
|
+
title="Editer la fiche"
|
135
|
+
className="edit-rest-elements edit-rest-elements-content"
|
136
|
+
>
|
137
|
+
<svg
|
138
|
+
xmlns="http://www.w3.org/2000/svg"
|
139
|
+
width="16"
|
140
|
+
height="16"
|
141
|
+
fill="currentColor"
|
142
|
+
class="bi bi-pencil-square"
|
143
|
+
viewBox="0 0 16 16"
|
144
|
+
>
|
145
|
+
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
|
146
|
+
<path
|
147
|
+
fill-rule="evenodd"
|
148
|
+
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"
|
149
|
+
/>
|
150
|
+
</svg>
|
151
|
+
</a>
|
152
|
+
) : (
|
153
|
+
""
|
154
|
+
)}
|
155
|
+
|
129
156
|
<article>
|
130
157
|
<header className="r-content-header">
|
131
158
|
<h2 className="r-content-title">{item.title}</h2>
|
@@ -3,10 +3,15 @@ import EventCard from "../EventCard/EventCard";
|
|
3
3
|
import { Link } from "react-router-dom";
|
4
4
|
import removeAccents from "remove-accents";
|
5
5
|
import { ScrollContext } from "../../../hooks/ScrollContext";
|
6
|
-
const ContactList = ({
|
7
|
-
|
6
|
+
const ContactList = ({
|
7
|
+
itemsArray,
|
8
|
+
onChange,
|
9
|
+
onHover,
|
10
|
+
showCategoriesOrTopics,
|
11
|
+
contextAuthenticatedUser,
|
12
|
+
}) => {
|
8
13
|
const { scrollPos, updateScrollPos } = useContext(ScrollContext);
|
9
|
-
|
14
|
+
|
10
15
|
function handleClick(event) {
|
11
16
|
onChange(event);
|
12
17
|
updateScrollPos(window.scrollY);
|
@@ -17,10 +22,7 @@ const ContactList = ({ itemsArray, onChange, onHover, showCategoriesOrTopics })
|
|
17
22
|
}
|
18
23
|
|
19
24
|
useEffect(() => {
|
20
|
-
window.scrollTo(
|
21
|
-
{ top: scrollPos,
|
22
|
-
left: 0,
|
23
|
-
behavior: 'instant'});
|
25
|
+
window.scrollTo({ top: scrollPos, left: 0, behavior: "instant" });
|
24
26
|
}, [itemsArray]);
|
25
27
|
|
26
28
|
return (
|
@@ -54,6 +56,7 @@ const ContactList = ({ itemsArray, onChange, onHover, showCategoriesOrTopics })
|
|
54
56
|
item={item}
|
55
57
|
showCategoriesOrTopics={showCategoriesOrTopics}
|
56
58
|
key={item.created}
|
59
|
+
contextAuthenticatedUser={contextAuthenticatedUser}
|
57
60
|
/>
|
58
61
|
</li>
|
59
62
|
))}
|
@@ -33,8 +33,8 @@ export default function Events(props) {
|
|
33
33
|
displayMap={props.displayMap}
|
34
34
|
onlyPastEvents={props.onlyPastEvents}
|
35
35
|
language={props.currentLanguage}
|
36
|
-
|
37
|
-
|
36
|
+
showCategoriesOrTopics={props.showCategoriesOrTopics}
|
37
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
38
38
|
/>
|
39
39
|
</ScrollContext.Provider>
|
40
40
|
</Provider>
|
@@ -143,6 +143,7 @@ function EventsView(props) {
|
|
143
143
|
itemsArray={itemsArray}
|
144
144
|
onHover={hoverID}
|
145
145
|
showCategoriesOrTopics={props.showCategoriesOrTopics}
|
146
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
146
147
|
/>
|
147
148
|
);
|
148
149
|
MapRender = (
|
@@ -279,6 +280,7 @@ function EventsView(props) {
|
|
279
280
|
queryUrl={props.queryUrl}
|
280
281
|
onChange={clickID}
|
281
282
|
onlyPastEvents={props.onlyPastEvents}
|
283
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
282
284
|
/>
|
283
285
|
</div>
|
284
286
|
{displayMap && (
|
@@ -31,6 +31,7 @@ export default function News(props) {
|
|
31
31
|
proposeUrl={props.proposeUrl}
|
32
32
|
batchSize={props.batchSize}
|
33
33
|
showCategoriesOrTopics={props.showCategoriesOrTopics}
|
34
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
34
35
|
/>
|
35
36
|
</ScrollContext.Provider>
|
36
37
|
</Provider>
|
@@ -111,6 +112,7 @@ const NewsView = (props) => {
|
|
111
112
|
onChange={clickID}
|
112
113
|
itemsArray={itemsArray}
|
113
114
|
showCategoriesOrTopics={props.showCategoriesOrTopics}
|
115
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
114
116
|
/>
|
115
117
|
);
|
116
118
|
} else if (!isLoading) {
|
@@ -215,6 +217,7 @@ const NewsView = (props) => {
|
|
215
217
|
onChange={clickID}
|
216
218
|
onReturn={filtersChange}
|
217
219
|
queryUrl={props.queryUrl}
|
220
|
+
contextAuthenticatedUser={props.contextAuthenticatedUser}
|
218
221
|
/>
|
219
222
|
}
|
220
223
|
></Route>
|