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
Pixel Humain
news
Commits
0ade6632
Commit
0ade6632
authored
Apr 26, 2022
by
thomas craipeau
Browse files
replace Yii::app()->request
parent
9b03f7b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
controllers/DefaultController.php
View file @
0ade6632
...
...
@@ -26,7 +26,7 @@ class DefaultController extends CommunecterController {
{
//echo "hello there"; exit ;
// if(Yii::app
()
->request->isAjax
Request
)
// if(Yii::
$
app->request->isAjax)
// echo $this->renderPartial("index");
// else
// {
...
...
@@ -34,7 +34,7 @@ class DefaultController extends CommunecterController {
// $this->render("index");
// }
if
(
Yii
::
app
()
->
request
->
isAjax
Request
)
if
(
Yii
::
$
app
->
request
->
isAjax
)
return
$this
->
renderPartial
(
"index"
);
else
{
$this
->
layout
=
"//layouts/directory"
;
...
...
controllers/actions/IndexAction.php
View file @
0ade6632
...
...
@@ -93,7 +93,7 @@ class IndexAction extends \PixelHumain\PixelHumain\components\Action
$params
[
"inline"
]
=
$inline
;
if
(
in_array
(
$type
,[
Organization
::
COLLECTION
,
Project
::
COLLECTION
,
Event
::
COLLECTION
,
Person
::
COLLECTION
]))
$params
[
"deletePending"
]
=
Element
::
isElementStatusDeletePending
(
$type
,
$id
);
if
(
Yii
::
app
()
->
request
->
isAjax
Request
)
if
(
Yii
::
$
app
->
request
->
isAjax
)
return
$ctrl
->
renderPartial
(
"news.views.co.index"
,
$params
);
else
return
$ctrl
->
render
(
"news.views.co.index"
,
$params
);
...
...
views/co/formCreateNews.php
View file @
0ade6632
...
...
@@ -230,7 +230,7 @@ if(isset(Yii::$app->session['userId'])){ ?>
<div
class=
"dropdown no-padding pull-right"
>
<a
data-toggle=
"dropdown"
class=
"btn btn-default"
id=
"btn-toogle-dropdown-targetIsAuthor"
href=
"#"
>
<?php
if
(
@
Yii
::
$app
->
session
[
"user"
][
"profilThumbImageUrl"
]){
?>
<img
height=
20
width=
20
src=
'
<?php
echo
Yii
::
app
()
->
getR
equest
()
->
getBaseUrl
(
true
)
.
Yii
::
$app
->
session
[
"user"
][
"profilThumbImageUrl"
];
?>
'
>
<img
height=
20
width=
20
src=
'
<?php
echo
Yii
::
$
app
->
r
equest
->
getBaseUrl
(
true
)
.
Yii
::
$app
->
session
[
"user"
][
"profilThumbImageUrl"
];
?>
'
>
<?php
}
else
{
?>
<img
height=
20
width=
20
src=
'
<?php
echo
$this
->
module
->
assetsUrl
.
'/images/thumb/default_citoyens.png'
?>
'
>
<?php
}
?>
...
...
@@ -241,7 +241,7 @@ if(isset(Yii::$app->session['userId'])){ ?>
<a
href=
"javascript:;"
class=
"targetIsAuthor"
data-value=
"1"
>
<h4
class=
"list-group-item-heading"
>
<?php
if
(
@
$parent
[
"profilThumbImageUrl"
]){
?>
<img
height=
20
width=
20
src=
'
<?php
echo
Yii
::
app
()
->
getR
equest
()
->
getBaseUrl
(
true
)
.
$parent
[
"profilThumbImageUrl"
]
?>
'
>
<img
height=
20
width=
20
src=
'
<?php
echo
Yii
::
$
app
->
r
equest
->
getBaseUrl
(
true
)
.
$parent
[
"profilThumbImageUrl"
]
?>
'
>
<?php
}
else
{
?>
<img
height=
20
width=
20
src=
'
<?php
echo
$this
->
module
->
assetsUrl
.
'/images/thumb/default_'
.
$contextParentType
.
'.png'
?>
'
>
<?php
}
?>
...
...
@@ -252,7 +252,7 @@ if(isset(Yii::$app->session['userId'])){ ?>
<li>
<a
href=
"javascript:;"
class=
"targetIsAuthor"
data-value=
"0"
><h4
class=
"list-group-item-heading"
>
<?php
if
(
@
Yii
::
$app
->
session
[
"user"
][
"profilThumbImageUrl"
]){
?>
<img
height=
20
width=
20
src=
'
<?php
echo
Yii
::
app
()
->
getR
equest
()
->
getBaseUrl
(
true
)
.
Yii
::
$app
->
session
[
"user"
][
"profilThumbImageUrl"
];
?>
'
>
<img
height=
20
width=
20
src=
'
<?php
echo
Yii
::
$
app
->
r
equest
->
getBaseUrl
(
true
)
.
Yii
::
$app
->
session
[
"user"
][
"profilThumbImageUrl"
];
?>
'
>
<?php
}
else
{
?>
<img
height=
20
width=
20
src=
'
<?php
echo
$this
->
module
->
assetsUrl
.
'/images/thumb/default_citoyens.png'
?>
'
>
<?php
}
?>
...
...
views/co/standalone.php
View file @
0ade6632
...
...
@@ -48,7 +48,7 @@ $cssAnsScriptFiles = array(
'/plugins/showdown/showdown.min.js'
,
'/plugins/to-markdown/to-markdown.js'
,
);
HtmlHelper
::
registerCssAndScriptsFiles
(
$cssAnsScriptFiles
,
Yii
::
app
()
->
request
->
baseUrl
);
HtmlHelper
::
registerCssAndScriptsFiles
(
$cssAnsScriptFiles
,
Yii
::
$
app
->
request
->
baseUrl
);
?>
<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