imio.smartweb.core 1.2.47__py3-none-any.whl → 1.2.49__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/contents/rest/base.py +8 -6
- imio/smartweb/core/contents/rest/directory/endpoint.py +2 -2
- imio/smartweb/core/contents/rest/events/endpoint.py +2 -2
- imio/smartweb/core/contents/rest/news/endpoint.py +2 -2
- imio/smartweb/core/contents/sections/events/view.py +2 -1
- imio/smartweb/core/contents/sections/news/view.py +2 -1
- imio/smartweb/core/contents/sections/text/views.py +2 -0
- imio/smartweb/core/contents/sections/views.py +2 -0
- imio/smartweb/core/tests/resources/json_rest_events.json +4 -1
- imio/smartweb/core/tests/test_rest.py +20 -17
- imio/smartweb/core/tests/test_section_events.py +9 -8
- imio/smartweb/core/tests/test_section_news.py +6 -6
- imio/smartweb/core/tests/test_vocabularies.py +2 -2
- imio/smartweb/core/utils.py +1 -1
- imio/smartweb/core/viewlets/footer.pt +5 -0
- imio/smartweb/core/viewlets/footer.py +5 -0
- imio/smartweb/core/vocabularies.py +2 -2
- imio/smartweb/core/webcomponents/build/css/373.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/486.smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/css/884.smartweb-webcomponents-compiled.css +1 -0
- imio/smartweb/core/webcomponents/build/css/smartweb-webcomponents-compiled.css +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/218.smartweb-webcomponents-compiled.js.LICENSE.txt +5 -0
- 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/736.smartweb-webcomponents-compiled.js +1 -1
- imio/smartweb/core/webcomponents/build/js/736.smartweb-webcomponents-compiled.js.LICENSE.txt +3 -3
- imio/smartweb/core/webcomponents/build/js/884.smartweb-webcomponents-compiled.js +1 -0
- 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/package.json +1 -0
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.jsx +112 -74
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +14 -22
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +24 -20
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +6 -4
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactList/ContactList.jsx +7 -2
- imio/smartweb/core/webcomponents/src/components/Annuaire/Filters/Filter.jsx +211 -98
- imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +1 -1
- imio/smartweb/core/webcomponents/src/components/Events/EventContent/EventContent.jsx +570 -379
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +13 -4
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +128 -82
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +79 -29
- imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +257 -90
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +63 -56
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.scss +60 -12
- imio/smartweb/core/webcomponents/src/components/Filters/IamData.jsx +42 -0
- imio/smartweb/core/webcomponents/src/components/Filters/MainFilter.scss +227 -0
- imio/smartweb/core/webcomponents/src/components/Filters/PublicTargetData.jsx +94 -0
- imio/smartweb/core/webcomponents/src/components/Filters/SelectStyles.js +58 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.jsx +149 -0
- imio/smartweb/core/webcomponents/src/components/Filters/TaxonomyFilter.scss +70 -0
- imio/smartweb/core/webcomponents/src/components/News/Filters/Filter.jsx +139 -82
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +98 -55
- imio/smartweb/core/webcomponents/src/components/News/News.scss +29 -9
- imio/smartweb/core/webcomponents/src/components/News/NewsCard/NewsCard.jsx +34 -31
- imio/smartweb/core/webcomponents/src/components/News/NewsContent/NewsContent.jsx +264 -244
- imio/smartweb/core/webcomponents/src/components/News/NewsList/NewsList.jsx +13 -8
- imio/smartweb/core/webcomponents/src/components/Search/ContactResult/ContactResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/EventsResult/EventsResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/Filters/Filter.jsx +5 -5
- imio/smartweb/core/webcomponents/src/components/Search/NewsResult/NewsResult.jsx +23 -12
- imio/smartweb/core/webcomponents/src/components/Search/Search.jsx +4 -4
- imio/smartweb/core/webcomponents/src/components/Search/WebResult/WebResult.jsx +13 -4
- imio/smartweb/core/webcomponents/src/index.jsx +3 -3
- imio/smartweb/core/webcomponents/src/index.scss +25 -68
- imio/smartweb/core/webcomponents/src/utils/Map.jsx +20 -11
- imio/smartweb/core/webcomponents/src/utils/translation.js +30 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/METADATA +30 -1
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/RECORD +75 -69
- imio/smartweb/core/webcomponents/build/css/686.smartweb-webcomponents-compiled.css +0 -1
- imio/smartweb/core/webcomponents/build/js/686.smartweb-webcomponents-compiled.js +0 -1
- /imio.smartweb.core-1.2.47-py3.8-nspkg.pth → /imio.smartweb.core-1.2.49-py3.8-nspkg.pth +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/WHEEL +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.47.dist-info → imio.smartweb.core-1.2.49.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,70 @@
|
|
1
|
+
.taxonomy-Filter {
|
2
|
+
width: 100%;
|
3
|
+
display: flex;
|
4
|
+
gap: 20px;
|
5
|
+
flex-wrap: wrap;
|
6
|
+
transition: all .3s ease-in-out;
|
7
|
+
}
|
8
|
+
|
9
|
+
|
10
|
+
.dropDownFilter {
|
11
|
+
display: flex;
|
12
|
+
justify-content: center;
|
13
|
+
align-items: center;
|
14
|
+
gap: 0 5px;
|
15
|
+
transition: max-width .3s ease-in-out;
|
16
|
+
transition: opacity 3s ease-in-out;
|
17
|
+
|
18
|
+
border: solid 1px #CFCFCF;
|
19
|
+
border-radius: 20px;
|
20
|
+
outline: 1px solid transparent;
|
21
|
+
|
22
|
+
&-active {
|
23
|
+
border-color: #2684FF;
|
24
|
+
outline: 1px solid #2684FF;
|
25
|
+
|
26
|
+
// border-width: 2px;
|
27
|
+
.sub0 {}
|
28
|
+
}
|
29
|
+
|
30
|
+
.sub0 {
|
31
|
+
text-decoration: none;
|
32
|
+
padding: 10px 10px;
|
33
|
+
}
|
34
|
+
|
35
|
+
.sub1 {
|
36
|
+
// transition: max-width .3s ease-in-out;
|
37
|
+
padding-right: 5px;
|
38
|
+
transition: all .4s cubic-bezier(0, .74, .58, 1.04);
|
39
|
+
|
40
|
+
div[class*="control"] {
|
41
|
+
flex-wrap: nowrap;
|
42
|
+
border-radius: 15px;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
.sub2 {
|
47
|
+
// transition: max-width .3s ease-in-out;
|
48
|
+
padding-right: 5px;
|
49
|
+
transition: all .4s cubic-bezier(0, .74, .58, 1.04);
|
50
|
+
|
51
|
+
div[class*="control"] {
|
52
|
+
flex-wrap: nowrap;
|
53
|
+
border-radius: 15px;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
.dropDownFilter-invisble {
|
58
|
+
opacity: 0;
|
59
|
+
max-width: 0px;
|
60
|
+
height: 0px;
|
61
|
+
overflow: hidden;
|
62
|
+
padding: 0;
|
63
|
+
}
|
64
|
+
|
65
|
+
.dropDownFilter-visible {
|
66
|
+
max-width: 150px;
|
67
|
+
height: auto;
|
68
|
+
opacity: 1;
|
69
|
+
}
|
70
|
+
}
|
@@ -2,14 +2,17 @@ import React, { useEffect, useCallback, useRef, useState } from "react";
|
|
2
2
|
import Select from "react-select";
|
3
3
|
import { useNavigate } from "react-router-dom";
|
4
4
|
import useAxios from "../../../hooks/useAxios";
|
5
|
-
import { Translator } from "react-translated";
|
6
|
-
import queryString from
|
5
|
+
import { Translator, Translate} from "react-translated";
|
6
|
+
import queryString from "query-string";
|
7
|
+
import { iam } from "./../../Filters/IamData";
|
8
|
+
import { menuStyles } from "./../../Filters/SelectStyles";
|
7
9
|
|
8
10
|
function Filters(props) {
|
9
11
|
let navigate = useNavigate();
|
10
12
|
const [inputValues, setInputValues] = useState(props.activeFilter);
|
11
13
|
const [topicsFilter, setTopicsFilter] = useState(null);
|
12
14
|
const [taxonomyFilter, setTaxonomyFilter] = useState(null);
|
15
|
+
const [localsCategoryFilter, setLocalsCategoryFilter] = useState([]);
|
13
16
|
const { response, error, isLoading } = useAxios({
|
14
17
|
method: "get",
|
15
18
|
url: "",
|
@@ -28,15 +31,36 @@ function Filters(props) {
|
|
28
31
|
}));
|
29
32
|
const optionsTaxonomy = response.category
|
30
33
|
? response.category.map((d) => ({
|
34
|
+
value: d.token,
|
35
|
+
label: d.title,
|
36
|
+
queryString: "category",
|
37
|
+
}))
|
38
|
+
: "";
|
39
|
+
const optionsLocalsCategory =
|
40
|
+
response.local_category &&
|
41
|
+
response.local_category.map((d) => ({
|
31
42
|
value: d.token,
|
32
43
|
label: d.title,
|
33
|
-
|
34
|
-
|
44
|
+
queryString: "local_category",
|
45
|
+
}));
|
35
46
|
setTopicsFilter(optionsTopics);
|
36
47
|
setTaxonomyFilter(optionsTaxonomy);
|
48
|
+
setLocalsCategoryFilter(optionsLocalsCategory)
|
37
49
|
}
|
38
50
|
}, [response]);
|
39
51
|
|
52
|
+
// const to group category and local category
|
53
|
+
const groupedOptions = [
|
54
|
+
{
|
55
|
+
label: <Translate text="Catégories spécifiques" />,
|
56
|
+
options: localsCategoryFilter,
|
57
|
+
},
|
58
|
+
{
|
59
|
+
label: <Translate text="Catégories" />,
|
60
|
+
options: taxonomyFilter,
|
61
|
+
},
|
62
|
+
];
|
63
|
+
|
40
64
|
const onChangeHandler = useCallback(({ target: { name, value } }) => {
|
41
65
|
if (value.length > 2) {
|
42
66
|
setInputValues((state) => ({ ...state, [name]: value }), []);
|
@@ -61,6 +85,18 @@ function Filters(props) {
|
|
61
85
|
}
|
62
86
|
});
|
63
87
|
|
88
|
+
const onChangeGroupSelect = useCallback((value, action) => {
|
89
|
+
if (value) {
|
90
|
+
setInputValues((state) => ({ ...state, [value.queryString]: value.value }), []);
|
91
|
+
} else {
|
92
|
+
setInputValues((prevState) => {
|
93
|
+
const state = { ...prevState };
|
94
|
+
const { [action.removedValues[0].queryString]: remove, ...rest } = state;
|
95
|
+
return rest;
|
96
|
+
});
|
97
|
+
}
|
98
|
+
});
|
99
|
+
|
64
100
|
// make to no launch useEffect first time
|
65
101
|
const firstUpdate = useRef(true);
|
66
102
|
useEffect(() => {
|
@@ -87,89 +123,110 @@ function Filters(props) {
|
|
87
123
|
let actTaxo =
|
88
124
|
taxonomyFilter &&
|
89
125
|
taxonomyFilter.filter((option) => option.value === props.activeFilter.category);
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
backgroundColor: "white",
|
94
|
-
borderRadius: "0",
|
95
|
-
height: "50px",
|
96
|
-
}),
|
97
|
-
placeholder: (styles) => ({
|
98
|
-
...styles,
|
99
|
-
color: "000",
|
100
|
-
fontWeight: "bold",
|
101
|
-
fontSize: "12px",
|
102
|
-
textTransform: "uppercase",
|
103
|
-
letterSpacing: "1.2px",
|
104
|
-
}),
|
105
|
-
option: (styles, { data, isDisabled, isFocused, isSelected }) => {
|
106
|
-
return {
|
107
|
-
...styles,
|
108
|
-
};
|
109
|
-
},
|
110
|
-
};
|
126
|
+
|
127
|
+
let actIam = iam && iam.filter((option) => option.value === props.activeFilter.topics);
|
128
|
+
|
111
129
|
return (
|
112
130
|
<React.Fragment>
|
113
|
-
<
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
<
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
+
<div className="react-filters-menu">
|
132
|
+
<div className="react-filters-container">
|
133
|
+
<form className="r-filter r-filter-search" onSubmit={handleSubmit}>
|
134
|
+
{/* <label>Recherche</label> */}
|
135
|
+
<div className="relative">
|
136
|
+
<Translator>
|
137
|
+
{({ translate }) => (
|
138
|
+
<input
|
139
|
+
className="input-custom-class"
|
140
|
+
name="SearchableText"
|
141
|
+
type="text"
|
142
|
+
value={inputValues.SearchableText}
|
143
|
+
onChange={onChangeHandler}
|
144
|
+
placeholder={translate({
|
145
|
+
text: "Recherche",
|
146
|
+
})}
|
147
|
+
/>
|
148
|
+
)}
|
149
|
+
</Translator>
|
150
|
+
<svg
|
151
|
+
xmlns="http://www.w3.org/2000/svg"
|
152
|
+
fill="none"
|
153
|
+
stroke="#9f9f9f"
|
154
|
+
strokeWidth="4"
|
155
|
+
aria-hidden="true"
|
156
|
+
display="block"
|
157
|
+
overflow="visible"
|
158
|
+
style={{ height: 16, width: 16 }}
|
159
|
+
viewBox="0 0 32 32"
|
160
|
+
>
|
161
|
+
<path d="M13 24a11 11 0 1 0 0-22 11 11 0 0 0 0 22zm8-3 9 9" />
|
162
|
+
</svg>
|
163
|
+
</div>
|
164
|
+
</form>
|
165
|
+
<div className="react-sep-menu"></div>
|
166
|
+
<div className="r-filter top-filter topics-Filter">
|
167
|
+
{/* <label>Thématiques</label> */}
|
168
|
+
<Translator>
|
169
|
+
{({ translate }) => (
|
170
|
+
<Select
|
171
|
+
styles={menuStyles}
|
172
|
+
name={"topics"}
|
173
|
+
className="select-custom-no-border library-topics"
|
174
|
+
isClearable
|
175
|
+
onChange={onChangeHandlerSelect}
|
176
|
+
options={topicsFilter && topicsFilter}
|
177
|
+
placeholder={translate({
|
178
|
+
text: "Thématiques",
|
179
|
+
})}
|
180
|
+
value={actTopi && actTopi[0]}
|
181
|
+
/>
|
182
|
+
)}
|
183
|
+
</Translator>
|
184
|
+
</div>
|
185
|
+
<div className="react-sep-menu"></div>
|
186
|
+
<div className="r-filter top-filter facilities-Filter">
|
187
|
+
{/* <label>Catégories</label> */}
|
188
|
+
<Translator>
|
189
|
+
{({ translate }) => (
|
190
|
+
<Select
|
191
|
+
styles={menuStyles}
|
192
|
+
name={"category"}
|
193
|
+
className="select-custom-no-border library-facilities"
|
194
|
+
isClearable
|
195
|
+
onChange={onChangeGroupSelect}
|
196
|
+
options={localsCategoryFilter.length === 0 ? taxonomyFilter && taxonomyFilter : groupedOptions}
|
197
|
+
placeholder={translate({
|
198
|
+
text: "Catégories",
|
199
|
+
})}
|
200
|
+
value={actTaxo && actTaxo[0]}
|
201
|
+
/>
|
202
|
+
)}
|
203
|
+
</Translator>
|
204
|
+
</div>
|
205
|
+
<div className="react-sep-menu"></div>
|
206
|
+
{/* Filtre iam */}
|
207
|
+
<div className="r-filter top-filter iam-Filter">
|
208
|
+
{/* <label>Thématiques</label> */}
|
209
|
+
<Translator>
|
210
|
+
{({ translate }) => (
|
211
|
+
<Select
|
212
|
+
styles={menuStyles}
|
213
|
+
name={"iam"}
|
214
|
+
className="select-custom-no-border library-topics"
|
215
|
+
isClearable
|
216
|
+
onChange={onChangeHandlerSelect}
|
217
|
+
options={iam && iam}
|
218
|
+
placeholder={translate({
|
219
|
+
text: "Profil",
|
220
|
+
})}
|
221
|
+
value={actIam && actIam[0]}
|
222
|
+
/>
|
223
|
+
)}
|
224
|
+
</Translator>
|
225
|
+
</div>
|
131
226
|
</div>
|
132
|
-
</form>
|
133
|
-
<div className="r-filter topics-Filter">
|
134
|
-
{/* <label>Thématiques</label> */}
|
135
|
-
<Translator>
|
136
|
-
{({ translate }) => (
|
137
|
-
<Select
|
138
|
-
styles={customStyles}
|
139
|
-
name={"topics"}
|
140
|
-
className="select-custom-class library-topics"
|
141
|
-
isClearable
|
142
|
-
onChange={onChangeHandlerSelect}
|
143
|
-
options={topicsFilter && topicsFilter}
|
144
|
-
placeholder={translate({
|
145
|
-
text: 'Thématiques'
|
146
|
-
})}
|
147
|
-
value={actTopi && actTopi[0]}
|
148
|
-
/>
|
149
|
-
)}
|
150
|
-
</Translator>
|
151
|
-
</div>
|
152
|
-
<div className="r-filter facilities-Filter">
|
153
|
-
{/* <label>Catégories</label> */}
|
154
|
-
<Translator>
|
155
|
-
{({ translate }) => (
|
156
|
-
<Select
|
157
|
-
styles={customStyles}
|
158
|
-
name={"category"}
|
159
|
-
className="select-custom-class library-facilities"
|
160
|
-
isClearable
|
161
|
-
onChange={onChangeHandlerSelect}
|
162
|
-
options={taxonomyFilter && taxonomyFilter}
|
163
|
-
placeholder={translate({
|
164
|
-
text: 'Catégories'
|
165
|
-
})}
|
166
|
-
value={actTaxo && actTaxo[0]}
|
167
|
-
/>
|
168
|
-
)}
|
169
|
-
</Translator>
|
170
227
|
</div>
|
171
228
|
</React.Fragment>
|
172
229
|
);
|
173
230
|
}
|
174
231
|
|
175
|
-
export default Filters;
|
232
|
+
export default Filters;
|
@@ -1,18 +1,15 @@
|
|
1
|
-
import React, { useEffect, useState, createContext
|
2
|
-
import {
|
3
|
-
BrowserRouter,
|
4
|
-
Routes,
|
5
|
-
Route,
|
6
|
-
} from "react-router-dom";
|
1
|
+
import React, { useEffect, useState, createContext } from "react";
|
2
|
+
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
7
3
|
import Filters from "./Filters/Filter";
|
8
4
|
import NewsContent from "./NewsContent/NewsContent";
|
9
5
|
import NewsList from "./NewsList/NewsList";
|
10
6
|
import useAxios from "../../hooks/useAxios";
|
11
7
|
import "./News.scss";
|
8
|
+
import "../Filters/MainFilter.scss";
|
12
9
|
import useFilterQuery from "../../hooks/useFilterQuery";
|
13
10
|
import { Provider, Translate } from "react-translated";
|
14
|
-
import translation from
|
15
|
-
import queryString from
|
11
|
+
import translation from "../../utils/translation";
|
12
|
+
import queryString from "query-string";
|
16
13
|
|
17
14
|
export const LanguageContext = createContext("fr");
|
18
15
|
export default function News(props) {
|
@@ -98,72 +95,118 @@ const NewsView = (props) => {
|
|
98
95
|
// coditional list render
|
99
96
|
let listRender;
|
100
97
|
if (itemsArray && itemsArray.length > 0) {
|
101
|
-
listRender =
|
98
|
+
listRender = (
|
99
|
+
<NewsList
|
100
|
+
onChange={clickID}
|
101
|
+
itemsArray={itemsArray}
|
102
|
+
showCategoriesOrTopics={props.showCategoriesOrTopics}
|
103
|
+
/>
|
104
|
+
);
|
102
105
|
} else if (!isLoading) {
|
103
|
-
listRender =
|
106
|
+
listRender = (
|
107
|
+
<p>
|
108
|
+
<Translate text="Aucune actualité n'a été trouvée" />
|
109
|
+
</p>
|
110
|
+
);
|
104
111
|
}
|
105
112
|
|
106
|
-
const divLoader =
|
107
|
-
|
113
|
+
const divLoader = (
|
114
|
+
<div className="lds-roller-container">
|
115
|
+
<div className="lds-roller">
|
116
|
+
<div></div>
|
117
|
+
<div></div>
|
118
|
+
<div></div>
|
119
|
+
<div></div>
|
120
|
+
<div></div>
|
121
|
+
<div></div>
|
122
|
+
<div></div>
|
123
|
+
<div></div>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
);
|
108
127
|
return (
|
109
128
|
<div>
|
110
129
|
<div className="r-wrapper r-actu-wrapper">
|
111
130
|
<div className="r-result r-annuaire-result">
|
112
131
|
<Routes>
|
113
|
-
<Route
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
132
|
+
<Route
|
133
|
+
exact
|
134
|
+
path="/"
|
135
|
+
element={
|
136
|
+
<>
|
137
|
+
<div className="r-result-filter actu-result-filter">
|
138
|
+
<Filters
|
139
|
+
url={props.queryFilterUrl}
|
140
|
+
activeFilter={filters}
|
141
|
+
onChange={filtersChange}
|
142
|
+
/>
|
143
|
+
{props.proposeUrl && (
|
123
144
|
<div className="r-add-news">
|
124
|
-
<a target="_blank" href={props.proposeUrl}
|
145
|
+
<a target="_blank" href={props.proposeUrl}>
|
146
|
+
<Translate text="Proposer une actualité" />
|
147
|
+
<svg
|
148
|
+
xmlns="http://www.w3.org/2000/svg"
|
149
|
+
width="16"
|
150
|
+
height="16"
|
151
|
+
fill="currentColor"
|
152
|
+
className="bi bi-plus-circle"
|
153
|
+
viewBox="0 0 16 16"
|
154
|
+
>
|
155
|
+
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" />
|
156
|
+
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4" />
|
157
|
+
</svg>
|
158
|
+
</a>
|
125
159
|
</div>
|
126
|
-
)
|
127
|
-
|
160
|
+
)}
|
161
|
+
</div>
|
128
162
|
{itemsNumber > 0 ? (
|
129
163
|
<p className="r-results-numbers">
|
130
164
|
<span>{itemsNumber}</span>{" "}
|
131
|
-
{itemsNumber > 1
|
132
|
-
|
133
|
-
|
165
|
+
{itemsNumber > 1 ? (
|
166
|
+
<Translate text="Actualités trouvées" />
|
167
|
+
) : (
|
168
|
+
<Translate text="Actualité trouvée" />
|
169
|
+
)}
|
134
170
|
</p>
|
135
171
|
) : (
|
136
|
-
<p className="r-results-numbers"
|
172
|
+
<p className="r-results-numbers">
|
173
|
+
<Translate text="Aucun résultat" />
|
174
|
+
</p>
|
137
175
|
)}
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
176
|
+
<div>{listRender}</div>
|
177
|
+
<div className="r-load-more">
|
178
|
+
{itemsNumber - props.batchSize > batchStart ? (
|
179
|
+
<div>
|
180
|
+
<span className="no-more-result">
|
181
|
+
{isLoading ? divLoader : ""}
|
182
|
+
</span>
|
183
|
+
<button onClick={loadMore} className="btn-grad">
|
184
|
+
{isLoading ? (
|
185
|
+
<Translate text="Chargement..." />
|
186
|
+
) : (
|
187
|
+
<Translate text="Plus de résultats" />
|
188
|
+
)}
|
189
|
+
</button>
|
190
|
+
</div>
|
191
|
+
) : (
|
143
192
|
<span className="no-more-result">
|
144
193
|
{isLoading ? divLoader : ""}
|
145
194
|
</span>
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
onChange={clickID}
|
162
|
-
onReturn={filtersChange}
|
163
|
-
queryUrl={props.queryUrl}
|
164
|
-
/>
|
165
|
-
}>
|
166
|
-
</Route>
|
195
|
+
)}
|
196
|
+
</div>
|
197
|
+
</>
|
198
|
+
}
|
199
|
+
></Route>
|
200
|
+
<Route
|
201
|
+
path={"/:name"}
|
202
|
+
element={
|
203
|
+
<NewsContent
|
204
|
+
onChange={clickID}
|
205
|
+
onReturn={filtersChange}
|
206
|
+
queryUrl={props.queryUrl}
|
207
|
+
/>
|
208
|
+
}
|
209
|
+
></Route>
|
167
210
|
</Routes>
|
168
211
|
</div>
|
169
212
|
</div>
|