Revision bb3360db
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/RequirementSpecPredefinedText.pm | ||
---|---|---|
14 | 14 |
); |
15 | 15 |
|
16 | 16 |
__PACKAGE__->run_before('check_auth'); |
17 |
__PACKAGE__->run_before('setup'); |
|
17 | 18 |
__PACKAGE__->run_before('load_requirement_spec_predefined_text', only => [ qw(edit update destroy) ]); |
18 | 19 |
|
19 | 20 |
# |
... | ... | |
80 | 81 |
$::auth->assert('config'); |
81 | 82 |
} |
82 | 83 |
|
84 |
sub setup { |
|
85 |
$::request->layout->use_javascript("${_}.js") for qw(ckeditor/ckeditor ckeditor/adapters/jquery); |
|
86 |
} |
|
87 |
|
|
83 | 88 |
# |
84 | 89 |
# helpers |
85 | 90 |
# |
SL/DB/RequirementSpecPredefinedText.pm | ||
---|---|---|
5 | 5 |
use SL::DB::MetaSetup::RequirementSpecPredefinedText; |
6 | 6 |
use SL::DB::Manager::RequirementSpecPredefinedText; |
7 | 7 |
use SL::DB::Helper::ActsAsList; |
8 |
use SL::DB::Helper::AttrHTML; |
|
8 | 9 |
use SL::Locale::String; |
9 | 10 |
|
10 | 11 |
__PACKAGE__->meta->initialize; |
11 | 12 |
|
13 |
__PACKAGE__->attr_html('text'); |
|
14 |
|
|
12 | 15 |
sub validate { |
13 | 16 |
my ($self) = @_; |
14 | 17 |
|
templates/webpages/requirement_spec_predefined_text/form.html | ||
---|---|---|
8 | 8 |
<table> |
9 | 9 |
<tr> |
10 | 10 |
<td>[% LxERP.t8("Description") %]</sup></td> |
11 |
<td>[% L.input_tag("requirement_spec_predefined_text.description", SELF.requirement_spec_predefined_text.description, size=60) %]</td> |
|
11 |
<td>[% L.input_tag("requirement_spec_predefined_text.description", SELF.requirement_spec_predefined_text.description, size=60, class='initial_focus') %]</td>
|
|
12 | 12 |
</tr> |
13 | 13 |
|
14 | 14 |
<tr> |
... | ... | |
16 | 16 |
<td>[% L.input_tag("requirement_spec_predefined_text.title", SELF.requirement_spec_predefined_text.title, size=60) %]</td> |
17 | 17 |
</tr> |
18 | 18 |
|
19 |
<tr> |
|
19 |
<tr valign="top">
|
|
20 | 20 |
<td>[% LxERP.t8("Content") %]</td> |
21 |
<td>[% L.textarea_tag("requirement_spec_predefined_text.text", SELF.requirement_spec_predefined_text.text, rows=10, cols=80) %]</td>
|
|
21 |
<td>[% L.textarea_tag("requirement_spec_predefined_text.text_as_restricted_html", SELF.requirement_spec_predefined_text.text_as_restricted_html, class='texteditor', style='width: 800px; height: 300px') %]</td>
|
|
22 | 22 |
</tr> |
23 | 23 |
</table> |
24 | 24 |
|
templates/webpages/requirement_spec_predefined_text/list.html | ||
---|---|---|
32 | 32 |
</td> |
33 | 33 |
|
34 | 34 |
<td>[% HTML.escape(requirement_spec_predefined_text.title) %]</td> |
35 |
<td>[% HTML.escape(L.truncate(requirement_spec_predefined_text.text)) %]</td> |
|
35 |
<td>[% HTML.escape(L.truncate(requirement_spec_predefined_text.text_as_stripped_html)) %]</td>
|
|
36 | 36 |
</tr> |
37 | 37 |
[%- END %] |
38 | 38 |
</tbody> |
Auch abrufbar als: Unified diff
Vordefinierte Pflichtenhefttextblöcke: HTML nutzen