Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amaury Van Espen
costum
Commits
488de511
Commit
488de511
authored
Mar 27, 2020
by
Pierre Goubeaux
Browse files
Alternatiba
parent
07c6e081
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
assets/css/alternatiba/index.css
View file @
488de511
...
...
@@ -21,6 +21,11 @@
position
:
absolute
!important
;
}
#dropdown
{
background-color
:
whitesmoke
;
width
:
55%
!important
;
z-index
:
1000
;
}
#mapAlternatiba
{
height
:
500px
;
...
...
assets/images/alternatiba/alter.png
0 → 100644
View file @
488de511
9.05 KB
assets/js/alternatiba/index.js
View file @
488de511
This diff is collapsed.
Click to expand it.
data/alternatiba.json
View file @
488de511
...
...
@@ -74,6 +74,9 @@
},
"htmlConstruct"
:
{
"appRendering"
:
"vertical"
,
"preview"
:
{
"element"
:
"costum.views.custom.alternatiba.element.preview"
},
"redirect"
:
{
"logged"
:
"welcome"
,
"unlogged"
:
"welcome"
...
...
@@ -159,7 +162,7 @@
"css"
:
"pageProfil.css"
,
"initView"
:
"newspaper"
,
"banner"
:
{
"img"
:
"/images/alternatiba/
img-01.jp
g"
,
"img"
:
"/images/alternatiba/
alter.pn
g"
,
"preferences"
:
true
,
"editButton"
:
{
"dynform"
:
true
...
...
@@ -172,17 +175,9 @@
"events"
:
true
,
"projects"
:
true
,
"community"
:
true
,
"collections"
:{
"label"
:
"Favoris"
,
"icon"
:
"star"
,
"class"
:
""
,
"separator"
:
true
,
"view"
:
"directory"
,
"dataAttr"
:{
"dir"
:
"collections"
,
"icon"
:
"star"
},
"typeAllow"
:[
"citoyens"
]
"pois"
:
{
"label"
:
"Articles"
,
"icon"
:
"newspaper-o"
}
},
"menuTop"
:
{
...
...
@@ -190,7 +185,7 @@
"btnGroup"
:
{
"imgProfil"
:
true
,
"nameProfil"
:
true
,
"newspaper"
:
tru
e
,
"newspaper"
:
fals
e
,
"cospace"
:
false
,
"chat"
:
false
,
"create"
:
false
,
...
...
@@ -235,17 +230,17 @@
"loader"
:
{
"background"
:
"white"
,
"ring1"
:
{
"color"
:
"#
f8e600
"
,
"height"
:
36
0
,
"width"
:
36
0
,
"color"
:
"#
098048
"
,
"height"
:
42
0
,
"width"
:
42
0
,
"left"
:
-15
,
"borderWidth"
:
4
,
"top"
:
-35
},
"ring2"
:
{
"color"
:
"#
2A353D
"
,
"height"
:
35
0
,
"width"
:
35
0
,
"color"
:
"#
098048
"
,
"height"
:
40
0
,
"width"
:
40
0
,
"left"
:
-10
,
"borderWidth"
:
5
,
"top"
:
-30
...
...
@@ -253,10 +248,10 @@
},
"progress"
:
{
"value"
:
{
"background"
:
"#
313757
"
"background"
:
"#
098048
"
},
"bar"
:
{
"background"
:
"
red
"
"background"
:
"
098048
"
}
},
"menuTop"
:
{
...
...
@@ -264,7 +259,7 @@
"button"
:
{
"paddingTop"
:
900
,
"fontSize"
:
25
,
"color"
:
"
black
"
"color"
:
"
#098048
"
},
"badge"
:
{
"background"
:
"#497614"
,
...
...
@@ -277,7 +272,7 @@
"display"
:
"none"
},
"connectBtn"
:
{
"background"
:
"#
313757
"
,
"background"
:
"#
098048
"
,
"color"
:
"white"
,
"fontSize"
:
18
,
"borderRadius"
:
10
,
...
...
@@ -289,7 +284,7 @@
"background"
:
"white"
,
"button"
:
{
"fontSize"
:
25
,
"color"
:
"
black
"
,
"color"
:
"
#098048
"
,
"hover"
:
{
"borderBottom"
:
"2px solid #fff"
}
...
...
@@ -300,7 +295,7 @@
"add"
:
{
"bottom"
:
10
,
"background"
:
"transparent"
,
"color"
:
"
black
"
"color"
:
"
#098048
"
},
"toolbarAdds"
:
{
"bottom"
:
10
...
...
@@ -312,15 +307,22 @@
]
},
"app"
:
{
"#live"
:
{
"subdomainName"
:
"L'actualités"
,
"slug"
:
"alternatiba"
,
"formCreate"
:
false
,
"#article"
:
{
"hash"
:
"#app.search"
,
"icon"
:
"newspaper-o"
,
"urlExtra"
:
"/page/article"
,
"useHeader"
:
true
,
"useFilter"
:
true
,
"inMenu"
:
true
,
"inMenuTop"
:
false
,
"inMenuLeft"
:
true
,
"useFilter"
:
false
,
"viewMode"
:
"list"
"open"
:
true
,
"subdomainName"
:
"Tous les articles"
,
"filters"
:
{
"types"
:
[
"poi"
],
"category"
:
"article"
},
"placeholderMainSearch"
:
"Quel article recherchez-vous ?"
},
"#agenda"
:
{
"subdomainName"
:
"L'agenda"
,
...
...
@@ -338,6 +340,85 @@
},
"projects"
:
{
"add"
:
true
},
"poi"
:
{
"color"
:
"blue"
,
"icon"
:
"newspaper-o"
,
"name"
:
"Article"
,
"add"
:
"onlyAdmin"
,
"createLabel"
:
"Ecrire un article"
,
"dynFormCostum"
:
{
"beforeBuild"
:
{
"properties"
:
{
"name"
:
{
"label"
:
"Titre de l'article"
,
"placeholder"
:
"Entrez le titre de votre article..."
},
"parent"
:
{
"label"
:
"Auteur(s)"
},
"shortDescription"
:
{
"inputType"
:
"textarea"
,
"label"
:
"Résumé de l'article"
,
"placeholder"
:
"Entrez un résumé de votre article (200 caractères max.)..."
,
"rules"
:
{
"maxlength"
:
200
},
"order"
:
5
},
"description"
:
{
"markdown"
:
true
,
"label"
:
"Texte de l'article"
,
"order"
:
6
},
"image"
:
{
"label"
:
"Image(s)"
,
"order"
:
7
},
"tags"
:
{
"label"
:
"Mot(s) clé (hashtags)"
},
"urls"
:
{
"label"
:
"Lien(s) : vidéo, page internet ou document..."
,
"order"
:
8
},
"rank"
:
{
"inputType"
:
"checkboxSimple"
,
"label"
:
"Mettre à la Une"
,
"params"
:
{
"onText"
:
"Oui"
,
"offText"
:
"Non"
,
"onLabel"
:
"Article à la Une"
,
"offLabel"
:
"Article normal"
,
"labelText"
:
"Mettre l'article à la Une"
},
"checked"
:
false
}
}
},
"onload"
:
{
"actions"
:
{
"setTitle"
:
"Ecrire un article"
,
"html"
:
{
"infocustom"
:
"Formulaire de création d'un article"
},
"presetValue"
:
{
"type"
:
"article"
},
"hide"
:
{
"typeselect"
:
1
,
"breadcrumbcustom"
:
1
,
"locationlocation"
:
1
}
}
}
}
}
},
"searchOpenMenu"
:
[
{
"url"
:
"#article"
,
"msg"
:
"Tous les articles"
}
]
}
views/custom/alternatiba/element/preview.php
View file @
488de511
...
...
@@ -27,9 +27,9 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->
?>
<div
class=
"col-xs-12 no-padding"
style=
"border-top: 1px solid #e7e7e7;border-bottom: 1px solid #e7e7e7;"
>
<center>
<?php
$imgHtml
=
'<img style="width:16vw;" class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive"
$imgHtml
=
'<img style="width:16vw
!important
;" class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive"
alt="'
.
Yii
::
t
(
"common"
,
"Banner"
)
.
'"
src="'
.
$url
.
'">'
;
if
(
@
$element
[
"profilRealBannerUrl"
]
&&
!
empty
(
$element
[
"profilRealBannerUrl"
])){
...
...
@@ -42,6 +42,7 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->
}
echo
$imgHtml
;
?>
</center>
</div>
<div
class=
"content-img-profil-preview col-xs-6 col-xs-offset-3 col-lg-4 col-lg-offset-4"
>
<?php
if
(
isset
(
$element
[
"profilMediumImageUrl"
])
&&
!
empty
(
$element
[
"profilMediumImageUrl"
])){
?>
...
...
views/custom/alternatiba/home.php
View file @
488de511
...
...
@@ -37,21 +37,37 @@ $cssAnsScriptFilesTheme = array(
"type"
=>
"cms"
)
);
}
if
(
isset
(
$this
->
costum
[
"contextType"
])
&&
isset
(
$this
->
costum
[
"contextId"
])){
$element
=
Element
::
getByTypeAndId
(
$this
->
costum
[
"contextType"
],
$this
->
costum
[
"contextId"
]
);
$pList
=
PHDB
::
findAndSort
(
Poi
::
COLLECTION
,
array
(
//"parent.".$this->costum["contextId"] => array('$exists'=>1),
//"parent.".$this->costum["contextId"].".type"=>$this->costum["contextType"],
"source.key"
=>
$this
->
costum
[
"slug"
],
"type"
=>
"article"
),
array
(
"updated"
=>-
1
),
3
);
}
$params
=
[
"tpl"
=>
"alternatiba"
,
"slug"
=>
$this
->
costum
[
"slug"
],
"canEdit"
=>
false
,
"el"
=>
$el
];
echo
$this
->
renderPartial
(
"costum.views.tpls.acceptAndAdmin"
,
$params
,
true
);
?>
<style
type=
"text/css"
>
@font-face
{
font-family
:
"Helvetica"
;
src
:
url
(
"
<?php
echo
Yii
::
app
()
->
getModule
(
"costum"
)
->
getAssetsUrl
()
?>
/
font
/
alternatiba
/
Helvetica
.
otf
"
)
}
#dropdown
{
background-color
:
whitesmoke
;
width
:
5
9%
;
#dropdown
{
background-color
:
whitesmoke
;
width
:
5
5%
!important
;
z-index
:
1000
;
}
.article-plus
{
width
:
16%
!important
;
margin-left
:
1%
;
}
</style>
<div
class=
"text-center row"
>
...
...
@@ -70,7 +86,7 @@ $cssAnsScriptFilesTheme = array(
</div>
<!-- Dropdown -->
<div
style=
"margin-left:
18
.7vw;"
id=
"dropdown"
class=
"hidden-xs dropdown-result-global-search hidden-xs col-sm-5 col-md-5 col-lg-5 no-padding"
>
<div
style=
"margin-left:
22
.7vw;
margin-top: -0.1%;
"
id=
"dropdown"
class=
"hidden-xs dropdown-result-global-search hidden-xs col-sm-5 col-md-5 col-lg-5 no-padding"
>
</div>
</center>
</div>
...
...
@@ -97,15 +113,47 @@ $cssAnsScriptFilesTheme = array(
</div>
<!-- Actualités -->
<div
class=
"col-xs-12 text-center"
>
<div
style=
"background-color: #ededed;"
class=
"col-xs-12 text-center"
>
<div>
<h1
style=
"font-family:'Helvetica';color: #098048;"
>
<i
class=
"fa fa-newspaper-o"
aria-hidden=
"true"
></i>
Actualités
</h1>
</div>
<div
id=
"newsstream"
class=
"col-xs-12 col-sm-12"
>
<div
class=
"col-sm-10 col-sm-offset-1 col-xs-12"
>
<?php
foreach
(
$pList
as
$k
=>
$v
){
$imgPath
=
(
isset
(
$v
[
"profilMediumImageUrl"
])
&&
!
empty
(
$v
[
"profilMediumImageUrl"
]))
?
Yii
::
app
()
->
createUrl
(
$v
[
"profilMediumImageUrl"
])
:
Yii
::
app
()
->
getModule
(
"costum"
)
->
assetsUrl
.
"/images/alternatiba/alter.png"
;
$desc
=
(
isset
(
$v
[
'shortDescription'
]))
?
$v
[
'shortDescription'
]
:
""
;
if
(
empty
(
$desc
)
&&
isset
(
$v
[
"description"
])){
$desc
=
/*(strlen($v["description"]) > 200) ? substr($v["description"], 0, 200)."..." :*/
$v
[
"description"
];
}
?>
<div
id=
"entity
<?php
echo
$k
?>
"
class=
"searchEntityContainer searchEntity shadow2 col-xs-12"
style=
"margin-bottom: 15px !important;padding-top: 5px !important;padding-bottom: 5px !important;"
>
<div
class=
"container-img col-xs-3 col-md-2"
><img
src=
"
<?php
echo
$imgPath
?>
"
class=
"img-responsive"
/>
</div>
<div
class=
"container-info col-xs-9 col-xs-10"
>
<h3
class=
"text-left col-xs-8"
style=
"font-size: 25px;text-transform: initial;color:#18a47c;"
>
<?php
echo
$v
[
"name"
]
?>
</h3>
<a
href=
"#page.type.poi.id.
<?php
echo
$k
?>
"
class=
"lbh-preview-element col-xs-12 no-padding"
>
<img
class=
"img-responsive article-plus"
src=
"
<?php
echo
Yii
::
app
()
->
getModule
(
'costum'
)
->
assetsUrl
;
?>
/images/alternatiba/plus-01.svg"
>
</a>
<?php
if
(
Authorisation
::
isInterfaceAdmin
()){
?>
<div
class=
"col-xs-12"
><button
class=
"btn-primary addForumBtn"
onclick=
"dyFObj.openForm('poi');"
>
Ajouter une actualité
</button></div>
<?php
}
?>
</div>
</div>
<?php
}
//var_dump($poiList);exit;
/*echo $this->renderPartial( "costum.views.tpls.multiElementBlock", array(
"poiList" => $poiList,
"blockName" => "el",
"titlecolor"=> "#e6344d",
"blockCt" => count($poiList),
"typeApp"=>"forum"
), true );*/
?>
</div>
</div>
...
...
@@ -132,7 +180,7 @@ $cssAnsScriptFilesTheme = array(
<?php
$params
=
array
(
"canEdit"
=>
$canEdit
);
?>
<!-- Agenda -->
<div
class=
"col-xs-12 text-center"
>
<div
style=
"background-color: #ededed;"
class=
"col-xs-12 text-center"
>
<div>
<h1
style=
"font-family:'Helvetica';color: #098048;"
>
<i
class=
"fa fa-calendar"
aria-hidden=
"true"
></i>
Agenda
...
...
@@ -157,6 +205,9 @@ $cssAnsScriptFilesTheme = array(
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
(){
setTitle
(
"
Alternatiba
"
);
$
(
"
#afficheMap
"
).
click
(
function
(){
if
(
document
.
getElementById
(
"
mapAlternatiba
"
).
style
.
display
==
"
initial
"
)
{
document
.
getElementById
(
"
mapAlternatiba
"
).
style
.
display
=
"
none
"
;
...
...
@@ -167,21 +218,55 @@ $cssAnsScriptFilesTheme = array(
}
});
setTitle
(
"
Alternatiba
"
);
var
mapAlternatibaHome
=
{};
var
paramsMapAlternatiba
=
{};
initAlternatibaMapView
();
$
(
"
#bg-homepage
"
).
removeClass
(
"
inline-block
"
);
$
(
"
#bg-homepage
"
).
removeClass
(
"
pull-left
"
);
urlNews
=
"
/news/co/index/type/
"
+
costum
.
contextType
+
"
/id/
"
+
costum
.
contextId
+
"
/formCreate/false/nbCol/2/scroll/false
"
;
urlNews
=
"
/news/co/index/type/
"
+
costum
.
contextType
+
"
/id/
"
+
costum
.
contextId
+
"
/formCreate/false/nbCol/1/scroll/false
"
;
ajaxPost
(
"
#newsstream
"
,
baseUrl
+
"
/
"
+
urlNews
,{
search
:
true
,
formCreate
:
false
,
scroll
:
false
,
nbCol
:
1
},
function
(
news
){},
"
html
"
);
});
$
(
"
#second-search-bar
"
).
off
().
on
(
"
keyup
"
,
function
(
e
){
$
(
"
#input-search-map
"
).
val
(
$
(
"
#second-search-bar
"
).
val
());
$
(
"
#second-search-xs-bar
"
).
val
(
$
(
"
#second-search-bar
"
).
val
());
if
(
e
.
keyCode
==
13
){
mylog
.
log
(
"
searchObject.text
"
,
searchObject
.
text
);
searchObject
.
text
=
$
(
this
).
val
();
searchObject
.
sourceKey
=
costum
.
slug
;
myScopes
.
type
=
"
open
"
;
myScopes
.
open
=
{};
startGlobalSearch
(
0
,
indexStepGS
);
$
(
"
#dropdown
"
).
css
(
'
display
'
,
'
block
'
);
}
});
$
(
"
#second-search-xs-bar
"
).
off
().
on
(
"
keyup
"
,
function
(
e
){
$
(
"
#input-search-map
"
).
val
(
$
(
"
#second-search-xs-bar
"
).
val
());
$
(
"
#second-search-bar
"
).
val
(
$
(
"
#second-search-xs-bar
"
).
val
());
if
(
e
.
keyCode
==
13
){
mylog
.
log
(
"
searchObject.text
"
,
searchObject
.
text
);
searchObject
.
text
=
$
(
this
).
val
();
searchObject
.
sourceKey
=
costum
.
slug
;
myScopes
.
type
=
"
open
"
;
myScopes
.
open
=
{};
startGlobalSearch
(
0
,
indexStepGS
);
$
(
"
#dropdown
"
).
css
(
'
display
'
,
'
block
'
);
}
});
$
(
"
#second-search-bar-addon-alternatiba, #second-search-xs-bar-addon
"
).
off
().
on
(
"
click
"
,
function
(){
$
(
"
#input-search-map
"
).
val
(
$
(
"
#second-search-bar
"
).
val
());
mylog
.
log
(
"
searchObject.text
"
,
searchObject
.
text
);
searchObject
.
text
=
$
(
"
#second-search-bar
"
).
val
();
searchObject
.
sourceKey
=
costum
.
slug
;
myScopes
.
type
=
"
open
"
;
myScopes
.
open
=
{};
startGlobalSearch
(
0
,
indexStepGS
);
$
(
"
#dropdown
"
).
css
(
'
display
'
,
'
block
'
);
});
function
initAlternatibaMapView
(){
alternatiba
.
initScopeObj
();
...
...
views/tpls/events/blockEventDescription.php
View file @
488de511
...
...
@@ -39,6 +39,7 @@ if( isset($this->costum["tpls"][$keyTpl]) ) {
.plus-img
{
width
:
39%
;
height
:
auto
;
margin-left
:
9vw
;
}
</style>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment