Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Doc-Template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Docs
Doc-Template
Commits
75f3c96e
Commit
75f3c96e
authored
Feb 01, 2019
by
ZTGAME\jiangpengqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
当uid为null或者空字符串时,gitment不显示
parent
ccabc01d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
ManagedReference.common.js
templates/default/ManagedReference.common.js
+1
-1
common.js
templates/default/common.js
+3
-2
conceptual.extension.js
templates/default/conceptual.extension.js
+2
-0
conceptual.html.primary.tmpl
templates/default/conceptual.html.primary.tmpl
+0
-1
No files found.
templates/default/ManagedReference.common.js
View file @
75f3c96e
...
...
@@ -188,7 +188,7 @@ function getDefinitions(category) {
function
handleItem
(
vm
,
gitContribute
,
gitUrlPattern
)
{
// get contribution information
vm
.
docurl
=
common
.
getImproveTheDocHref
(
vm
,
gitContribute
,
gitUrlPattern
);
vm
.
sourceurl
=
common
.
getViewSourceHref
(
vm
,
gitContribute
,
gitUrlPattern
);
vm
.
sourceurl
=
common
.
getViewSourceHref
(
vm
,
null
,
gitUrlPattern
);
// set to null incase mustache looks up
vm
.
summary
=
vm
.
summary
||
null
;
...
...
templates/default/common.js
View file @
75f3c96e
...
...
@@ -32,7 +32,7 @@ function getHtmlId(input) {
// Note: the parameter `gitContribute` won'
t
be
used
in
this
function
function
getViewSourceHref
(
item
,
gitContribute
,
gitUrlPattern
)
{
if
(
!
item
||
!
item
.
source
||
!
item
.
source
.
remote
)
return
''
;
return
getRemoteUrl
(
item
.
source
.
remote
,
item
.
source
.
startLine
-
'0'
+
1
,
gitContribute
,
gitUrlPattern
);
return
getRemoteUrl
(
item
.
source
.
remote
,
item
.
source
.
startLine
-
'0'
+
1
,
null
,
gitUrlPattern
);
}
function
getImproveTheDocHref
(
item
,
gitContribute
,
gitUrlPattern
)
{
...
...
@@ -119,7 +119,8 @@ function getRepoWithoutGitExtension(repo) {
function
normalizeGitUrlToHttps
(
repo
)
{
var
pos
=
repo
.
indexOf
(
'@'
);
if
(
pos
==
-
1
)
return
repo
;
return
'https://'
+
repo
.
substr
(
pos
+
1
).
replace
(
/:
[
0-9
]
+/g
,
''
).
replace
(
/:/g
,
'/'
);
//return 'https://' + repo.substr(pos + 1).replace(/:[0-9]+/g, '').replace(/:/g, '/');
return
'https://'
+
repo
.
substr
(
pos
+
1
).
replace
(
/:/g
,
'/'
);
}
function
getNewFileUrl
(
item
,
gitContribute
,
gitUrlPattern
)
{
...
...
templates/default/conceptual.extension.js
View file @
75f3c96e
...
...
@@ -11,5 +11,7 @@ exports.preTransform = function (model) {
* This method will be called at the end of exports.transform in conceptual.html.primary.js
*/
exports
.
postTransform
=
function
(
model
)
{
if
(
model
.
uid
==
null
||
model
.
uid
.
trim
()
==
""
)
model
.
gitment_enable
=
false
return
model
;
}
\ No newline at end of file
templates/default/conceptual.html.primary.tmpl
View file @
75f3c96e
...
...
@@ -3,6 +3,5 @@
{{{rawTitle}}}
{{{conceptual}}}
{{^_disableToc}}
<h1>Down of conceptual!{{{uid}}}</h1>
{{>partials/gitment}}
{{/_disableToc}}
\ No newline at end of file
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