imio.smartweb.core 1.2.46__py3-none-any.whl → 1.2.48__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/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 +4 -1
- 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/919.smartweb-webcomponents-compiled.css +1 -1
- 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/src/components/Annuaire/Annuaire.jsx +101 -74
- imio/smartweb/core/webcomponents/src/components/Annuaire/Annuaire.scss +5 -23
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactCard/ContactCard.jsx +24 -19
- imio/smartweb/core/webcomponents/src/components/Annuaire/ContactContent/ContactContent.jsx +4 -2
- 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/EventContent/EventContent.jsx +506 -378
- imio/smartweb/core/webcomponents/src/components/Events/EventList/EventList.jsx +13 -4
- imio/smartweb/core/webcomponents/src/components/Events/Events.jsx +117 -82
- imio/smartweb/core/webcomponents/src/components/Events/Events.scss +53 -29
- imio/smartweb/core/webcomponents/src/components/Events/Filters/Filter.jsx +257 -90
- imio/smartweb/core/webcomponents/src/components/Filters/DateFilter.jsx +62 -54
- 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 +217 -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 +127 -82
- imio/smartweb/core/webcomponents/src/components/News/News.jsx +86 -53
- imio/smartweb/core/webcomponents/src/components/News/News.scss +30 -10
- 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/Search.scss +1 -1
- 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 +11 -65
- imio/smartweb/core/webcomponents/src/utils/Map.jsx +18 -9
- imio/smartweb/core/webcomponents/src/utils/translation.js +60 -0
- imio.smartweb.core-1.2.48-py3.10-nspkg.pth +3 -0
- {imio.smartweb.core-1.2.46.dist-info → imio.smartweb.core-1.2.48.dist-info}/METADATA +31 -3
- {imio.smartweb.core-1.2.46.dist-info → imio.smartweb.core-1.2.48.dist-info}/RECORD +71 -76
- {imio.smartweb.core-1.2.46.dist-info → imio.smartweb.core-1.2.48.dist-info}/WHEEL +1 -1
- imio/smartweb/core/webcomponents/build/10512eee43c7b5ed4757.svg +0 -1
- imio/smartweb/core/webcomponents/build/10dd862b2cdd9c68e1a8.svg +0 -1
- imio/smartweb/core/webcomponents/build/a38272f263f8328349f2.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/location-bla.1423bcce16ddcb21141430cac1428dc1.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/next-react.17bc43ff4a6a86f4520f5782f6a89a72.svg +0 -1
- imio/smartweb/core/webcomponents/build/assets/search.57bdbf5b191499cd77514097d1c4972c.svg +0 -1
- 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/webcomponents/src/assets/facebook-news.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/location-bla.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/next-react.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/search.svg +0 -1
- imio/smartweb/core/webcomponents/src/assets/skeleton.svg +0 -1
- imio.smartweb.core-1.2.46-py3.8-nspkg.pth +0 -2
- {imio.smartweb.core-1.2.46.dist-info → imio.smartweb.core-1.2.48.dist-info}/LICENSE.GPL +0 -0
- {imio.smartweb.core-1.2.46.dist-info → imio.smartweb.core-1.2.48.dist-info}/LICENSE.rst +0 -0
- {imio.smartweb.core-1.2.46.dist-info → imio.smartweb.core-1.2.48.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.core-1.2.46.dist-info → imio.smartweb.core-1.2.48.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, moreFilterStyles } 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 locale" />,
|
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 }), []);
|
@@ -87,89 +111,110 @@ function Filters(props) {
|
|
87
111
|
let actTaxo =
|
88
112
|
taxonomyFilter &&
|
89
113
|
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
|
-
};
|
114
|
+
|
115
|
+
let actIam = iam && iam.filter((option) => option.value === props.activeFilter.topics);
|
116
|
+
|
111
117
|
return (
|
112
118
|
<React.Fragment>
|
113
|
-
<
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
<
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
119
|
+
<div className="react-filters-menu">
|
120
|
+
<div className="react-filters-container">
|
121
|
+
<form className="r-filter r-filter-search" onSubmit={handleSubmit}>
|
122
|
+
{/* <label>Recherche</label> */}
|
123
|
+
<div className="relative">
|
124
|
+
<Translator>
|
125
|
+
{({ translate }) => (
|
126
|
+
<input
|
127
|
+
className="input-custom-class"
|
128
|
+
name="SearchableText"
|
129
|
+
type="text"
|
130
|
+
value={inputValues.SearchableText}
|
131
|
+
onChange={onChangeHandler}
|
132
|
+
placeholder={translate({
|
133
|
+
text: "Recherche",
|
134
|
+
})}
|
135
|
+
/>
|
136
|
+
)}
|
137
|
+
</Translator>
|
138
|
+
<svg
|
139
|
+
xmlns="http://www.w3.org/2000/svg"
|
140
|
+
fill="none"
|
141
|
+
stroke="#9f9f9f"
|
142
|
+
strokeWidth="4"
|
143
|
+
aria-hidden="true"
|
144
|
+
display="block"
|
145
|
+
overflow="visible"
|
146
|
+
style={{ height: 16, width: 16 }}
|
147
|
+
viewBox="0 0 32 32"
|
148
|
+
>
|
149
|
+
<path d="M13 24a11 11 0 1 0 0-22 11 11 0 0 0 0 22zm8-3 9 9" />
|
150
|
+
</svg>
|
151
|
+
</div>
|
152
|
+
</form>
|
153
|
+
<div className="react-sep-menu"></div>
|
154
|
+
<div className="r-filter top-filter topics-Filter">
|
155
|
+
{/* <label>Thématiques</label> */}
|
156
|
+
<Translator>
|
157
|
+
{({ translate }) => (
|
158
|
+
<Select
|
159
|
+
styles={menuStyles}
|
160
|
+
name={"topics"}
|
161
|
+
className="select-custom-no-border library-topics"
|
162
|
+
isClearable
|
163
|
+
onChange={onChangeHandlerSelect}
|
164
|
+
options={topicsFilter && topicsFilter}
|
165
|
+
placeholder={translate({
|
166
|
+
text: "Thématiques",
|
167
|
+
})}
|
168
|
+
value={actTopi && actTopi[0]}
|
169
|
+
/>
|
170
|
+
)}
|
171
|
+
</Translator>
|
172
|
+
</div>
|
173
|
+
<div className="react-sep-menu"></div>
|
174
|
+
<div className="r-filter top-filter facilities-Filter">
|
175
|
+
{/* <label>Catégories</label> */}
|
176
|
+
<Translator>
|
177
|
+
{({ translate }) => (
|
178
|
+
<Select
|
179
|
+
styles={menuStyles}
|
180
|
+
name={"category"}
|
181
|
+
className="select-custom-no-border library-facilities"
|
182
|
+
isClearable
|
183
|
+
onChange={onChangeHandlerSelect}
|
184
|
+
options={localsCategoryFilter.length === 0 ? taxonomyFilter && taxonomyFilter : groupedOptions}
|
185
|
+
placeholder={translate({
|
186
|
+
text: "Catégories",
|
187
|
+
})}
|
188
|
+
value={actTaxo && actTaxo[0]}
|
189
|
+
/>
|
190
|
+
)}
|
191
|
+
</Translator>
|
192
|
+
</div>
|
193
|
+
<div className="react-sep-menu"></div>
|
194
|
+
{/* Filtre iam */}
|
195
|
+
<div className="r-filter top-filter iam-Filter">
|
196
|
+
{/* <label>Thématiques</label> */}
|
197
|
+
<Translator>
|
198
|
+
{({ translate }) => (
|
199
|
+
<Select
|
200
|
+
styles={menuStyles}
|
201
|
+
name={"iam"}
|
202
|
+
className="select-custom-no-border library-topics"
|
203
|
+
isClearable
|
204
|
+
onChange={onChangeHandlerSelect}
|
205
|
+
options={iam && iam}
|
206
|
+
placeholder={translate({
|
207
|
+
text: "Profil",
|
208
|
+
})}
|
209
|
+
value={actIam && actIam[0]}
|
210
|
+
/>
|
211
|
+
)}
|
212
|
+
</Translator>
|
213
|
+
</div>
|
131
214
|
</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
215
|
</div>
|
171
216
|
</React.Fragment>
|
172
217
|
);
|
173
218
|
}
|
174
219
|
|
175
|
-
export default Filters;
|
220
|
+
export default Filters;
|
@@ -1,18 +1,15 @@
|
|
1
1
|
import React, { useEffect, useState, createContext, useContex } from "react";
|
2
|
-
import {
|
3
|
-
BrowserRouter,
|
4
|
-
Routes,
|
5
|
-
Route,
|
6
|
-
} from "react-router-dom";
|
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,108 @@ 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 =
|
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
|
+
);
|
107
127
|
|
108
128
|
return (
|
109
129
|
<div>
|
110
130
|
<div className="r-wrapper r-actu-wrapper">
|
111
131
|
<div className="r-result r-annuaire-result">
|
112
132
|
<Routes>
|
113
|
-
<Route
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
133
|
+
<Route
|
134
|
+
exact
|
135
|
+
path="/"
|
136
|
+
element={
|
137
|
+
<>
|
138
|
+
<div className="r-result-filter actu-result-filter">
|
139
|
+
<Filters
|
140
|
+
url={props.queryFilterUrl}
|
141
|
+
activeFilter={filters}
|
142
|
+
onChange={filtersChange}
|
143
|
+
/>
|
144
|
+
{props.proposeUrl && (
|
123
145
|
<div className="r-add-news">
|
124
|
-
<a target="_blank" href={props.proposeUrl}
|
146
|
+
<a target="_blank" href={props.proposeUrl}>
|
147
|
+
<Translate text="Proposer une actualité" />
|
148
|
+
</a>
|
125
149
|
</div>
|
126
|
-
)
|
127
|
-
|
150
|
+
)}
|
151
|
+
</div>
|
128
152
|
{itemsNumber > 0 ? (
|
129
153
|
<p className="r-results-numbers">
|
130
154
|
<span>{itemsNumber}</span>{" "}
|
131
|
-
{itemsNumber > 1
|
132
|
-
|
133
|
-
|
155
|
+
{itemsNumber > 1 ? (
|
156
|
+
<Translate text="Actualités trouvées" />
|
157
|
+
) : (
|
158
|
+
<Translate text="Actualité trouvée" />
|
159
|
+
)}
|
134
160
|
</p>
|
135
161
|
) : (
|
136
|
-
<p className="r-results-numbers"
|
162
|
+
<p className="r-results-numbers">
|
163
|
+
<Translate text="Aucun résultat" />
|
164
|
+
</p>
|
137
165
|
)}
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
166
|
+
<div>{listRender}</div>
|
167
|
+
<div className="r-load-more">
|
168
|
+
{itemsNumber - props.batchSize > batchStart ? (
|
169
|
+
<div>
|
170
|
+
<span className="no-more-result">
|
171
|
+
{isLoading ? divLoader : ""}
|
172
|
+
</span>
|
173
|
+
<button onClick={loadMore} className="btn-grad">
|
174
|
+
{isLoading ? (
|
175
|
+
<Translate text="Chargement..." />
|
176
|
+
) : (
|
177
|
+
<Translate text="Plus de résultats" />
|
178
|
+
)}
|
179
|
+
</button>
|
180
|
+
</div>
|
181
|
+
) : (
|
143
182
|
<span className="no-more-result">
|
144
183
|
{isLoading ? divLoader : ""}
|
145
184
|
</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>
|
185
|
+
)}
|
186
|
+
</div>
|
187
|
+
</>
|
188
|
+
}
|
189
|
+
></Route>
|
190
|
+
<Route
|
191
|
+
path={"/:name"}
|
192
|
+
element={
|
193
|
+
<NewsContent
|
194
|
+
onChange={clickID}
|
195
|
+
onReturn={filtersChange}
|
196
|
+
queryUrl={props.queryUrl}
|
197
|
+
/>
|
198
|
+
}
|
199
|
+
></Route>
|
167
200
|
</Routes>
|
168
201
|
</div>
|
169
202
|
</div>
|