Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
f85106b6
Commit
f85106b6
authored
12 years ago
by
Frank Karlitschek
Browse files
Options
Downloads
Patches
Plain Diff
first version of the new documentation system integration.
parent
b8b64d6f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/docu/admin/index.php
+1
-0
1 addition, 0 deletions
core/docu/admin/index.php
core/docu/user/index.php
+3
-0
3 additions, 0 deletions
core/docu/user/index.php
settings/help.php
+13
-9
13 additions, 9 deletions
settings/help.php
settings/templates/help.php
+29
-33
29 additions, 33 deletions
settings/templates/help.php
with
46 additions
and
42 deletions
core/docu/admin/index.php
0 → 100644
+
1
−
0
View file @
f85106b6
here
goes
the
admin
documentation
This diff is collapsed.
Click to expand it.
core/docu/user/index.php
0 → 100644
+
3
−
0
View file @
f85106b6
here
goes
the
user
documentation
This diff is collapsed.
Click to expand it.
settings/help.php
+
13
−
9
View file @
f85106b6
...
@@ -12,15 +12,19 @@ OC_App::loadApps();
...
@@ -12,15 +12,19 @@ OC_App::loadApps();
OC_Util
::
addStyle
(
"settings"
,
"settings"
);
OC_Util
::
addStyle
(
"settings"
,
"settings"
);
OC_App
::
setActiveNavigationEntry
(
"help"
);
OC_App
::
setActiveNavigationEntry
(
"help"
);
$pagesize
=
7
;
if
(
isset
(
$_GET
[
'page'
]))
$page
=
$_GET
[
'page'
];
else
$page
=
0
;
if
(
isset
(
$_GET
[
'mode'
])
and
$_GET
[
'mode'
]
==
'admin'
)
{
$kbe
=
OC_OCSClient
::
getKnownledgebaseEntries
(
$page
,
$pagesize
);
$url
=
OC_Helper
::
linkToAbsolute
(
'core'
,
'docu/admin'
);
$totalitems
=
$kbe
[
'totalitems'
];
}
else
{
unset
(
$kbe
[
'totalitems'
]);
$url
=
OC_Helper
::
linkToAbsolute
(
'core'
,
'docu/user'
);
$pagecount
=
ceil
(
$totalitems
/
$pagesize
);
}
$url1
=
OC_Helper
::
linkToRoute
(
"settings_help"
)
.
'?mode=user'
;
$url2
=
OC_Helper
::
linkToRoute
(
"settings_help"
)
.
'?mode=admin'
;
$tmpl
=
new
OC_Template
(
"settings"
,
"help"
,
"user"
);
$tmpl
=
new
OC_Template
(
"settings"
,
"help"
,
"user"
);
$tmpl
->
assign
(
"kbe"
,
$kbe
);
$tmpl
->
assign
(
"admin"
,
OC_Group
::
inGroup
(
OC_User
::
getUser
(),
'admin'
)
);
$tmpl
->
assign
(
"pagecount"
,
$pagecount
);
$tmpl
->
assign
(
"url"
,
$url
);
$tmpl
->
assign
(
"page"
,
$page
);
$tmpl
->
assign
(
"url1"
,
$url1
);
$tmpl
->
assign
(
"url2"
,
$url2
);
$tmpl
->
printPage
();
$tmpl
->
printPage
();
This diff is collapsed.
Click to expand it.
settings/templates/help.php
+
29
−
33
View file @
f85106b6
<?php
/**
* 2012 Frank Karlitschek frank@owncloud.org
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
?>
<div
id=
"controls"
>
<div
id=
"controls"
>
<a
class=
"button newquestion"
href=
"http://owncloud.org/support"
target=
"_blank"
>
<?php
echo
$l
->
t
(
'Documentation'
);
?>
</a>
<a
class=
"button newquestion"
href=
"
<?php
echo
(
$_
[
'url1'
]);
?>
"
>
<?php
echo
$l
->
t
(
'User Documentation'
);
?>
</a>
<a
class=
"button newquestion"
href=
"http://owncloud.org/support/big-files"
target=
"_blank"
>
<?php
echo
$l
->
t
(
'Managing Big Files'
);
?>
</a>
<?php
if
(
$_
[
'admin'
])
{
?>
<a
class=
"button newquestion"
href=
"
<?php
echo
(
$_
[
'url2'
]);
?>
"
>
<?php
echo
$l
->
t
(
'Administrator Documentation'
);
?>
</a>
<?php
}
?>
<a
class=
"button newquestion"
href=
"http://apps.owncloud.com/knowledgebase/editquestion.php?action=new"
target=
"_blank"
>
<?php
echo
$l
->
t
(
'Ask a question'
);
?>
</a>
<a
class=
"button newquestion"
href=
"http://owncloud.org/support"
target=
"_blank"
>
<?php
echo
$l
->
t
(
'Online Documentation'
);
?>
</a>
<?php
<a
class=
"button newquestion"
href=
"http://forum.owncloud.org"
target=
"_blank"
>
<?php
echo
$l
->
t
(
'Forum'
);
?>
</a>
$url
=
OC_Helper
::
linkTo
(
"settings"
,
"help.php"
)
.
'?page='
;
<a
class=
"button newquestion"
href=
"https://github.com/owncloud/core/issues"
target=
"_blank"
>
<?php
echo
$l
->
t
(
'Bugtracker'
);
?>
</a>
$pageNavi
=
OC_Util
::
getPageNavi
(
$_
[
'pagecount'
],
$_
[
'page'
],
$url
);
</div>
if
(
$pageNavi
)
{
<br
/><br
/>
$pageNavi
->
printPage
();
<iframe
src=
"
<?php
echo
(
$_
[
'url'
]);
?>
"
width=
"100%"
id=
"ifm"
></iframe>
}
?>
</diV>
<script
language=
"JavaScript"
>
<?php
if
(
!
is_array
(
$_
[
"kbe"
])
||
!
count
(
$_
[
"kbe"
]))
:
?>
<!--
<div
class=
"helpblock"
>
<p>
<?php
echo
$l
->
t
(
'Problems connecting to help database.'
);
?>
</p>
function
pageY
(
elem
)
{
<p><a
href=
"http://apps.owncloud.com/kb"
>
<?php
echo
$l
->
t
(
'Go there manually.'
);
?>
</a></p>
return
elem
.
offsetParent
?
(
elem
.
offsetTop
+
pageY
(
elem
.
offsetParent
))
:
elem
.
offsetTop
;
</div>
}
<?php
else
:
?>
var
buffer
=
5
;
//scroll bar buffer
<?php
foreach
(
$_
[
"kbe"
]
as
$kb
)
:
?>
function
resizeIframe
()
{
<div
class=
"helpblock"
>
var
height
=
document
.
documentElement
.
clientHeight
;
<?php
if
(
$kb
[
"preview1"
]
<>
""
)
echo
(
'<img class="preview" src="'
.
$kb
[
"preview1"
]
.
'" />'
);
?>
height
-=
pageY
(
document
.
getElementById
(
'
ifm
'
))
+
buffer
;
<?php
if
(
$kb
[
'detailpage'
]
<>
''
)
echo
(
'<p><a target="_blank" href="'
.
$kb
[
'detailpage'
]
.
'"><strong>'
.
$kb
[
"name"
]
.
'</strong></a></p>'
);
?>
height
=
(
height
<
0
)
?
0
:
height
;
<p>
<?php
echo
$kb
[
'description'
];
?>
</p>
document
.
getElementById
(
'
ifm
'
).
style
.
height
=
height
+
'
px
'
;
<?php
if
(
$kb
[
'answer'
]
<>
''
)
echo
(
'<p><strong>'
.
$l
->
t
(
'Answer'
)
.
':</strong><p>'
.
$kb
[
'answer'
]
.
'</p>'
);
?>
}
</div>
<?php
endforeach
;
document
.
getElementById
(
'
ifm
'
).
onload
=
resizeIframe
;
endif
?>
window
.
onresize
=
resizeIframe
;
//-->
</script>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment