diff --git a/_shared_assets/themes/owncloud/static/style.css b/_shared_assets/themes/owncloud/static/style.css index 37eb790a5..0b80c3f7e 100644 --- a/_shared_assets/themes/owncloud/static/style.css +++ b/_shared_assets/themes/owncloud/static/style.css @@ -95,7 +95,7 @@ ul{list-style:disc;} ol{list-style:decimal;} li{line-height:18px;} ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} -dl{margin-bottom:18px; padding-top: 15px;} +dl{margin-bottom:18px;} dl:first-child{ margin-top: 0; } @@ -1122,3 +1122,7 @@ tt.file:before { margin-left: 15px; padding-left: 0; } + +h3 { + margin-top: 25px; +} diff --git a/developer_manual/index.rst b/developer_manual/index.rst index ec1e45edd..331bfb11c 100644 --- a/developer_manual/index.rst +++ b/developer_manual/index.rst @@ -10,10 +10,10 @@ Contents :maxdepth: 2 tutorial - debugging - configfile templates unittests + debugging + configfile security diff --git a/developer_manual/templates.rst b/developer_manual/templates.rst index 5bb559fb7..23cd4d6be 100644 --- a/developer_manual/templates.rst +++ b/developer_manual/templates.rst @@ -273,11 +273,13 @@ OC_Template -Template syntax ---------------- +Template functions +------------------ + +These functions are automatically available in all templates. + html_select_options ~~~~~~~~~~~~~~~~~~~ - .. php:function:: html_select_options($options, $selected[, $params]) :param array $options: an array of the form value => label @@ -288,6 +290,9 @@ html_select_options FIXME: explain parameters + +human_file_size +~~~~~~~~~~~~~~~ .. php:function:: human_file_size($bytes) :param int $bytes: the bytes that we want to convert to a more readable format @@ -304,6 +309,8 @@ Turns bytes into human readable formats, for instance 1024 bytes get turned into +image_path +~~~~~~~~~~ .. php:function:: image_path($app, $image) :param string $app: the name of your app as a string. If the string is empty, ownCloud looks for the image in core @@ -332,6 +339,9 @@ When you pass an empty string for $app, the following directories will be search + +link_to +~~~~~~~ .. php:function:: link_to($app, $file, [$args]) :param string $app: the name of your app as a string. If the string is empty, ownCloud asumes that the file is in /core/ @@ -359,6 +369,8 @@ This function is used to produce generate clean and absolute links to your files +mimetype_icon +~~~~~~~~~~~~~ .. php:function:: mimetype_icon($mimetype) :param array $mimetype: the mimetype for which we want to look up the icon @@ -376,6 +388,8 @@ A shortcut for getting a mimetype icon. +p +~ .. php:function:: p($data) :param $data: the variable/array/object that should be printed @@ -399,6 +413,8 @@ This is the print statement which prints out XSS escaped values. ownCloud does n +print_unescaped +~~~~~~~~~~~~~~~ .. php:function:: print_unescaped($data) :param $data: the variable/array/object that should be printed @@ -419,6 +435,8 @@ This function does not escape the content for XSS. This would typically be used +relative_modified_date +~~~~~~~~~~~~~~~~~~~~~~ .. php:function:: relative_modified_date($timestamp) :param int $timestamp: the timestamp from whom we compute the time span until now @@ -434,6 +452,9 @@ Instead of displaying a date, it is often better to give a relative date like: " + +simple_file_size +~~~~~~~~~~~~~~~~ .. php:function:: simple_file_size($bytes) :param int $bytes: the bytes that we want to convert to a more readable format in megabytes @@ -448,6 +469,8 @@ A more simpler function that only turns bytes into megabytes. If its smaller tha ?>
+ + Further reading --------------- - http://en.wikipedia.org/wiki/Cross-site_scripting diff --git a/developer_manual/unittests.rst b/developer_manual/unittests.rst index eea34ec19..e3bfe70b4 100644 --- a/developer_manual/unittests.rst +++ b/developer_manual/unittests.rst @@ -1,5 +1,5 @@ -How To Do Unittests In Owncloud -=============================== +Unittests +========= Getting PHPUnit ---------------