Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
co2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
516
Issues
516
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pixel Humain
co2
Commits
f97ce0e4
Commit
f97ce0e4
authored
Jul 06, 2020
by
Laurent Després
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lien doc gitlab
parent
233d0094
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
24 deletions
+64
-24
assets/js/default/profilSocial.js
assets/js/default/profilSocial.js
+1
-1
controllers/AppController.php
controllers/AppController.php
+1
-1
views/docs/index.php
views/docs/index.php
+62
-22
No files found.
assets/js/default/profilSocial.js
View file @
f97ce0e4
...
...
@@ -208,7 +208,7 @@ var pageProfil = {
//$("#central-container").append(loading);
ajaxPost
(
"
#central-container
"
,
baseUrl
+
"
/interop/mediawiki/index
"
,
{
id
:
contextData
.
id
,
name
:
contextData
.
slug
,
type
:
contextData
.
type
,
for
:
"
index
"
},
{
id
:
contextData
.
id
,
name
:
contextData
.
name
,
type
:
contextData
.
type
,
for
:
"
index
"
},
function
(){},
"
html
"
);
},
bookmarks
:
function
(){
...
...
controllers/AppController.php
View file @
f97ce0e4
...
...
@@ -215,7 +215,7 @@ class AppController extends CommunecterController {
"page"
=>
@
$page
,
"dir"
=>@
$dir
,
);
echo
$this
->
renderPartial
(
"
../docs/
index"
,
$params
,
true
);
echo
$this
->
renderPartial
(
"
co2.views.docs.
index"
,
$params
,
true
);
}
...
...
views/docs/index.php
View file @
f97ce0e4
...
...
@@ -17,17 +17,17 @@ HtmlHelper::registerCssAndScriptsFiles($cssJS, Yii::app()->getModule(Yii::app()-
<?php
if
(
@
Yii
::
app
()
->
session
[
"costum"
]
&&
@
Yii
::
app
()
->
session
[
"costum"
][
"docTpl"
])
{
$this
->
renderPartial
(
Yii
::
app
()
->
session
[
"costum"
][
"docTpl"
],
true
);
}
else
{
$curl
=
curl_init
();
/////////////////!!!!!!!!!!!!!!!attention ici il faudrat changerl'url
curl_setopt
(
$curl
,
CURLOPT_URL
,
"http://192.168.0.15
:5080/interop/gitlab/tree?url=https://gitlab.adullact.net/&repo=pixelhumain/codoc"
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$curl
,
CURLOPT_HEADER
,
0
);
$ret
=
curl_exec
(
$curl
);
$dataDecode
=
json_decode
(
$ret
,
true
);
curl_close
(
$curl
);
//var_dump($dataDecode);exit;?>
$this
->
renderPartial
(
Yii
::
app
()
->
session
[
"costum"
][
"docTpl"
],
true
);
}
else
{
$curl
=
curl_init
();
/////////////////!!!!!!!!!!!!!!!attention ici il faudrat changerl'url
curl_setopt
(
$curl
,
CURLOPT_URL
,
"http://192.168.0.11
:5080/interop/gitlab/tree?url=https://gitlab.adullact.net/&repo=pixelhumain/codoc"
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_setopt
(
$curl
,
CURLOPT_HEADER
,
0
);
$ret
=
curl_exec
(
$curl
);
$dataDecode
=
json_decode
(
$ret
,
true
);
curl_close
(
$curl
);
//var_dump($dataDecode);exit;?>
<
style
type
=
"text/css"
>
#docs-main-container{
...
...
@@ -167,6 +167,39 @@ if (@Yii::app()->session["costum"] && @Yii::app()->session["costum"]["docTpl"])
left
:
0
!
important
;
}
}
/* container-docs css */
#container-docs>h1 {
text
-
align
:
center
;
border
-
radius
:
3
px
;
background
-
color
:
whitesmoke
;
margin
-
left
:
5
%
;
max
-
width
:
90
%
;
}
#container-docs>h2, #container-docs>h3 {
text
-
align
:
center
;
border
-
radius
:
3
px
;
background
-
color
:
whitesmoke
;
margin
-
left
:
2
%
;
max
-
width
:
95
%
;
}
#container-docs>table {
border
:
3
px
solid
black
;
border
-
radius
:
5
px
;
margin
:
4
px
;
border
-
collapse
:
unset
;
background
-
color
:
rgb
(
145
,
156
,
151
);
}
/* #container-docs>table>thead {
background-color: rgb(145, 156, 151);
} */
#container-docs>table>tbody>tr>td {
border
:
2
px
solid
grey
;
border
-
radius
:
3
px
;
padding
-
right
:
2
px
;
margin
-
left
:
3
px
;
background
-
color
:
aliceblue
;
}
</
style
>
<
div
id
=
"docs-main-container"
>
<
div
id
=
"header-doc"
class
=
"shadow2"
>
...
...
@@ -279,7 +312,7 @@ jQuery(document).ready(function() {
$
(
"
#container-docs
"
).
text
();
$
(
'
#container-docs
'
).
html
(
gitlabMdToHtml
(
readme
));
dir
=
(
dir
==
""
)
?
mainLanguage
:
dir
;
if
(
costum
==
null
){
if
(
page
!=
""
)
initDocs
(
page
,
dir
);
...
...
@@ -288,7 +321,7 @@ jQuery(document).ready(function() {
}
bindLinkDocs
()
$
(
"
#show-menu-xs
"
).
click
(
function
(){
if
(
!
$
(
this
).
hasClass
(
"
show-dir
"
)){
$
(
this
).
addClass
(
"
show-dir
"
).
data
(
"
title
"
,
"
<?php
echo
Yii
::
t
(
"common"
,
"Close"
)
?>
"
).
find
(
"
i
"
).
removeClass
(
"
fa-chevron-right
"
).
addClass
(
"
fa-times
"
);
...
...
@@ -317,7 +350,7 @@ function initDocs(page, dir){
}
function
bindLinkDocs
()
{
$
(
"
.link-docs-menu
"
).
off
().
on
(
"
click
"
,
function
(){
$
(
"
.link-docs-menu
"
).
off
().
on
(
"
click
"
,
async
function
(){
if
(
$
(
this
).
hasClass
(
"
down-menu
"
)
&&
!
$
(
this
).
hasClass
(
"
active
"
)){
$
(
this
).
parent
().
siblings
().
children
(
"
a
"
).
removeClass
(
"
active
"
).
find
(
"
i
"
).
removeClass
(
"
fa-angle-down
"
).
addClass
(
"
fa-angle-right
"
);
...
...
@@ -343,18 +376,25 @@ function bindLinkDocs() {
if
(
$
(
this
).
hasClass
(
"
gitlab
"
))
{
$
(
"
.gitlab
"
).
removeClass
(
'
active
'
);
$
(
this
).
addClass
(
'
active
'
);
showLoader
(
'
#container-docs
'
);
//
showLoader('#container-docs');
var
titleH
=
$
(
this
).
data
(
"
path
"
);
var
headContent
=
"
<span><h1 class='head-content-title'>
"
+
titleH
.
slice
(
0
,
-
3
)
+
"
<a href='
"
+
urlGit
+
repoGit
+
"
/-/blob/master/
"
+
$
(
this
).
data
(
"
path
"
)
+
"
' class='lbh pull-right' target='_blank' id='edit'>
"
+
"
<span><i class='fa fa-edit'></i></span></a></h1></span>
"
;
var
urlInterop
=
baseUrl
+
"
/interop/gitlab/page?url=
"
+
urlGit
+
repoGit
+
"
/-/blob/master/
"
+
$
(
this
).
data
(
'
path
'
);
getAjax
(
''
,
urlInterop
,
function
(
data
)
{
descHtml
=
gitlabMdToHtml
(
data
.
content
);
$
(
"
#container-docs
"
).
html
(
headContent
+
descHtml
).
removeClass
(
"
text-center
"
).
attr
(
"
style
"
,
"
margin-left: 27%; max-width: 72%
"
);
bindLinkDocs
();
}
,
"
html
"
);
var
urlInterop
=
"
http://localhost:5080/interop/gitlab/page?url=
"
+
urlGit
+
repoGit
+
"
/-/blob/master/
"
+
$
(
this
).
data
(
'
path
'
);
var
data
=
await
fetch
(
"
http://localhost:5080/interop/gitlab/page?url=
"
+
urlGit
+
repoGit
+
"
/-/blob/master/
"
+
$
(
this
).
data
(
'
path
'
))
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
gitlabMdToHtml
(
data
.
content
))
.
then
(
str
=>
$
(
"
#container-docs
"
).
html
(
headContent
+
descHtml
).
removeClass
(
"
text-center
"
).
attr
(
"
style
"
,
"
margin-left: 27%; max-width: 72%
"
));
// getAjax('', urlInterop, function (data) {
// console.log(data.content)
// descHtml = gitlabMdToHtml(data.content);
// console.log("tesst")
// $("#container-docs").html(headContent+descHtml).removeClass("text-center").attr("style", "margin-left: 27%; max-width: 72%");
// bindLinkDocs();
// }
// , "html");
}
// hashDocs="#docs.page."+$(this).data("type");
// if(notNull($(this).data("dir")) && $(this).data("dir") != "")
...
...
Write
Preview
Markdown
is supported
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