diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2015-07-11 15:27:33 +0200 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2015-07-11 15:27:33 +0200 |
commit | 4b2ce2725e9a4525e273fb1b08243aad74770a3d (patch) | |
tree | c90fb0fef5c9ac923817f908f1c3586efa47ec59 /template/en/default/extensions | |
parent | Bumped version to 4.4.9 (diff) | |
download | bugzilla-4b2ce2725e9a4525e273fb1b08243aad74770a3d.tar.gz bugzilla-4b2ce2725e9a4525e273fb1b08243aad74770a3d.tar.bz2 bugzilla-4b2ce2725e9a4525e273fb1b08243aad74770a3d.zip |
Vanilla 4.4.9 to 5.0 without history due to massive merge conflicts
Diffstat (limited to 'template/en/default/extensions')
-rw-r--r-- | template/en/default/extensions/config.pm.tmpl | 5 | ||||
-rw-r--r-- | template/en/default/extensions/extension.pm.tmpl | 12 | ||||
-rw-r--r-- | template/en/default/extensions/hook-readme.txt.tmpl | 6 | ||||
-rw-r--r-- | template/en/default/extensions/index-admin.rst.tmpl | 23 | ||||
-rw-r--r-- | template/en/default/extensions/index-user.rst.tmpl | 23 | ||||
-rw-r--r-- | template/en/default/extensions/name-readme.txt.tmpl | 6 | ||||
-rw-r--r-- | template/en/default/extensions/util.pm.tmpl | 10 |
7 files changed, 71 insertions, 14 deletions
diff --git a/template/en/default/extensions/config.pm.tmpl b/template/en/default/extensions/config.pm.tmpl index cb7195767..68ed260c1 100644 --- a/template/en/default/extensions/config.pm.tmpl +++ b/template/en/default/extensions/config.pm.tmpl @@ -12,8 +12,11 @@ [% PROCESS extensions/license.txt.tmpl %] -package B[% %]ugzilla::Extension::[% name %]; +package Bugzilla::Extension::[% name %]; + +use 5.10.1; use strict; +use warnings; use constant NAME => '[% name %]'; diff --git a/template/en/default/extensions/extension.pm.tmpl b/template/en/default/extensions/extension.pm.tmpl index 206ea88f4..823440421 100644 --- a/template/en/default/extensions/extension.pm.tmpl +++ b/template/en/default/extensions/extension.pm.tmpl @@ -12,16 +12,20 @@ [% PROCESS extensions/license.txt.tmpl %] -package B[% %]ugzilla::Extension::[% name %]; +package Bugzilla::Extension::[% name %]; + +use 5.10.1; use strict; -use base qw(B[% %]ugzilla::Extension); +use warnings; + +use parent qw(Bugzilla::Extension); # This code for this is in [% path %]/lib/Util.pm -use B[% %]ugzilla::Extension::[% name %]::Util; +use Bugzilla::Extension::[% name %]::Util; our $VERSION = '0.01'; -# See the documentation of B[% %]ugzilla::Hook ("perldoc B[% %]ugzilla::Hook" +# See the documentation of Bugzilla::Hook ("perldoc Bugzilla::Hook" # in the bugzilla directory) for a list of all available hooks. sub install_update_db { my ($self, $args) = @_; diff --git a/template/en/default/extensions/hook-readme.txt.tmpl b/template/en/default/extensions/hook-readme.txt.tmpl index 63e09e419..86ace3f51 100644 --- a/template/en/default/extensions/hook-readme.txt.tmpl +++ b/template/en/default/extensions/hook-readme.txt.tmpl @@ -7,7 +7,7 @@ #%] Template hooks go in this directory. Template hooks are called in normal -[%+ terms.Bugzilla %] templates like [[% '%' %] Hook.process('some-hook') %]. +Bugzilla templates like [[% '%' %] Hook.process('some-hook') %]. More information about them can be found in the documentation of -B[% %]ugzilla::Extension. (Do "perldoc B[% %]ugzilla::Extension" from the main -[%+ terms.Bugzilla %] directory to see that documentation.) +Bugzilla::Extension. (Do "perldoc Bugzilla::Extension" from the main +Bugzilla directory to see that documentation.) diff --git a/template/en/default/extensions/index-admin.rst.tmpl b/template/en/default/extensions/index-admin.rst.tmpl new file mode 100644 index 000000000..508937710 --- /dev/null +++ b/template/en/default/extensions/index-admin.rst.tmpl @@ -0,0 +1,23 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # name: string; the name of the extension. + #%] + +[% USE String('#') %] +[% name %] +[%+ String.repeat(name.length) %] + +This is a sample Adminstrator documentation file for the [% name %] extension. +Like all of the Bugzilla docs, it's written in +`reStructured Text (reST) format <http://sphinx-doc.org/latest/rest.html>`_ +and will be compiled by `Sphinx <http://sphinx-doc.org/>`_. + +If you build the docs yourself using :file:`makedocs.pl`, this file will get +incorporated into the Installed Extensions chapter of the Administration Guide. diff --git a/template/en/default/extensions/index-user.rst.tmpl b/template/en/default/extensions/index-user.rst.tmpl new file mode 100644 index 000000000..b09fc1cd1 --- /dev/null +++ b/template/en/default/extensions/index-user.rst.tmpl @@ -0,0 +1,23 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# INTERFACE: + # name: string; the name of the extension. + #%] + +[% USE String('#') %] +[% name %] +[%+ String.repeat(name.length) %] + +This is a sample User documentation file for the [% name %] extension. +Like all of the Bugzilla docs, it's written in +`reStructured Text (reST) format <http://sphinx-doc.org/latest/rest.html>`_ +and will be compiled by `Sphinx <http://sphinx-doc.org/>`_. + +If you build the docs yourself using :file:`makedocs.pl`, this file will get +incorporated into the Installed Extensions chapter of the User Guide. diff --git a/template/en/default/extensions/name-readme.txt.tmpl b/template/en/default/extensions/name-readme.txt.tmpl index 22fbad4df..e792512b5 100644 --- a/template/en/default/extensions/name-readme.txt.tmpl +++ b/template/en/default/extensions/name-readme.txt.tmpl @@ -9,8 +9,8 @@ Normal templates go in this directory. You can load them in your code like this: -use B[% %]ugzilla::Error; -my $template = B[% %]ugzilla->template; +use Bugzilla::Error; +my $template = Bugzilla->template; $template->process('[% name FILTER lower %]/some-template.html.tmpl') or ThrowTemplateError($template->error()); @@ -18,7 +18,7 @@ That would be how to load a file called <kbd>some-template.html.tmpl</kbd> that was in this directory. Note that you have to be careful that the full path of your template -never conflicts with a template that exists in [% terms.Bugzilla %] or in +never conflicts with a template that exists in Bugzilla or in another extension, or your template might override that template. That's why we created this directory called '[% name FILTER lower %]' for you, so you can put your templates in here to help avoid conflicts. diff --git a/template/en/default/extensions/util.pm.tmpl b/template/en/default/extensions/util.pm.tmpl index 6c9fe3795..3baab57fd 100644 --- a/template/en/default/extensions/util.pm.tmpl +++ b/template/en/default/extensions/util.pm.tmpl @@ -12,15 +12,19 @@ [% PROCESS extensions/license.txt.tmpl %] -package B[% %]ugzilla::Extension::[% name %]::Util; +package Bugzilla::Extension::[% name %]::Util; + +use 5.10.1; use strict; -use base qw(Exporter); +use warnings; + +use parent qw(Exporter); our @EXPORT = qw( ); # This file can be loaded by your extension via -# "use B[% %]ugzilla::Extension::[% name %]::Util". You can put functions +# "use Bugzilla::Extension::[% name %]::Util". You can put functions # used by your extension in here. (Make sure you also list them in # @EXPORT.) |