Merge branch 'test' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / print / marei / requirement_spec.tex
1 % config: use-template-toolkit=1
2 % config: tag-style=$( )$
3 $( USE KiviLatex )$
4 $( USE P )$
5 \documentclass{scrartcl}
6
7 \usepackage[reqspeclogo,$( IF !rspec.version )$draftlogo$( ELSE )$secondpagelogo$( END )$]{kivitendo}
8 $( KiviLatex.required_packages_for_html )$
9
10 \kivitendobgsettings
11
12 \setlength{\LTpre}{0pt}
13 \setlength{\LTpost}{0pt}
14
15 \renewcommand{\kivitendosecondfoot}{%
16   \parbox{12cm}{%
17     \defaultfont\scriptsize%
18     $( KiviLatex.filter(rspec.displayable_name) )$\\
19     $( !rspec.version ? "Arbeitskopie ohne Version" : "Version " _ rspec.version.version_number _ " vom " _ rspec.version.itime.to_kivitendo(precision='minute') )$
20
21     \vspace*{0.2cm}%
22     Seite \thepage%
23   }%
24 }
25
26 \reqspecsectionstyle
27
28 \begin{document}
29
30 %% Titelseite
31
32 \setlongtables
33 \defaultfont
34
35 \begin{picture}(0,0)
36   \put(3.5,-5){%
37     \begin{minipage}[t][6cm]{12cm}
38       \Large
39       \textcolor{kivitendodarkred}{$( KiviLatex.filter(rspec.type.description) )$}
40
41       \huge
42       $( KiviLatex.filter(rspec.customer.name) )$
43
44       \vspace*{0.5cm}
45       \Large
46       $( KiviLatex.filter(rspec.title) )$
47       \normalsize
48       %$( IF rspec.version )$
49
50       Version $( KiviLatex.filter(rspec.version.version_number) )$
51       %$( END )$
52     \end{minipage}%
53   }
54 \end{picture}
55
56 %% Inhaltsverzeichnis
57
58 %\newpage
59
60 %\tableofcontents
61
62 %%%% Deaktiviertes Beispiel, wie benutzerdefinierte Variablen ausgegeben werden können: %%%%
63 %% \newpage
64 %%
65 %% \section{Benutzerdefinierte Variablen}
66 %%
67 %% %$ ( FOREACH cvar = rspec.cvars_by_config ) $
68 %% Name: $ ( KiviLatex.filter(cvar.config.name) ) $
69 %%
70 %% Wert:% $ ( IF cvar.config.type == 'htmlfield' ) $
71 %% $ ( KiviLatex.filter_html(cvar.value_as_text) ) $
72 %% % $ ( ELSE ) $
73 %% $ ( KiviLatex.filter(cvar.value_as_text) ) $
74 %% % $ ( END ) $
75 %%
76 %% %$ ( END ) $
77 %%%% ENDE Beispiel für benutzerdefinierte Variablen %%%%
78
79 %% Versionen
80 \newpage
81
82 \section{Versionen}
83
84 \vspace*{0.7cm}
85
86 %$( SET working_copy     = rspec.working_copy_id ? rspec.working_copy : rspec )$
87 %$( SET versioned_copies = rspec.version ? working_copy.versioned_copies_sorted(max_version_number = rspec.version.version_number) : working_copy.versioned_copies_sorted )$
88 %$( IF !versioned_copies.size )$
89 Bisher wurden noch keine Versionen angelegt.
90 %$( ELSE )$
91 \begin{longtable}{|p{2cm}|p{2cm}|p{12cm}|}
92   \hline
93   \multicolumn{1}{|r}{\small Version}                                                                                &
94   \multicolumn{1}{|r|}{\small Datum}                                                                                 &
95   \small Beschreibung                                                                                                  \\
96   \hline
97   %$( FOREACH versioned_copy = versioned_copies )$
98   \multicolumn{1}{|r}{\small $( KiviLatex.filter(versioned_copy.version.version_number) )$}                          &
99   \multicolumn{1}{|r|}{\small $( KiviLatex.filter(versioned_copy.version.itime.to_kivitendo(precision='minute')) )$} &
100   \small $( KiviLatex.filter(versioned_copy.version.description) )$                                                    \\
101   %$( END )$
102   \hline
103 \end{longtable}
104 %$( END )$
105
106 %$( BLOCK picture_outputter )$
107 %  $( SET width_cm = (picture.picture_width / 150.0) * 2.54 )$
108 %  $( SET width_cm = width_cm < 16.4 ? width_cm : 16.4 )$
109 \begin{figure}[h!]
110   \centering
111   \includegraphics[width=$( width_cm )$cm,keepaspectratio]{$( picture.print_file_name )$}
112
113   \mbox{Abbildung $( picture.number )$: $( KiviLatex.filter(picture.description ? picture.description : picture.picture_file_name) )$}
114 \end{figure}
115 %$( END )$
116
117 %$( BLOCK text_block_outputter )$
118 %  $( SET text_blocks = rspec.text_blocks_sorted(output_position=output_position) )$
119 %  $( IF text_blocks.size )$
120
121 \newpage
122
123 \section{$( heading )$}
124
125 %    $( FOREACH text_block = text_blocks )$
126
127 \subsection{$( KiviLatex.filter(text_block.title) )$}
128
129 $( KiviLatex.filter_html(text_block.text_as_restricted_html) )$
130
131 %      $( FOREACH picture = text_block.pictures_sorted.as_list )$
132 $( PROCESS picture_outputter picture=picture )$
133 %      $( END )$
134
135 %    $( END )$
136 %  $( END )$
137 %$( END )$
138
139 %% Textblöcke davor
140 $( PROCESS text_block_outputter output_position=0 heading='Allgemeines' )$
141
142 %% Abschnitte und Funktionsblöcke
143 \newpage
144
145 \section{Spezifikation}
146
147 \setlength{\LTpre}{-0.3cm}
148
149
150 %$( FOREACH top_item = rspec.sections_sorted )$
151
152 \subsection{Abschnitt $( KiviLatex.filter(top_item.fb_number) )$: $( KiviLatex.filter(top_item.title) )$}
153
154 %  $( IF top_item.description )$
155 $( KiviLatex.filter_html(top_item.description_as_restricted_html.replace('\r', '').replace('\n+\Z', '')) )$
156
157 \vspace{0.5cm}
158 %  $( END )$
159 %  $( FOREACH item = top_item.children_sorted )$
160 \parbox[t]{1.0cm}{\textcolor{kivitendodarkred}{$>>>$}}%
161 \parbox[t]{15.0cm}{%
162   \begin{longtable}{p{2.8cm}p{11.7cm}}
163     Funktionsblock & $( KiviLatex.filter(item.fb_number) )$                                       \\
164     Beschreibung   & $( KiviLatex.filter_html(item.description_as_restricted_html) )$             \\
165     Abhängigkeiten & $( KiviLatex.filter(item.presenter.requirement_spec_item_dependency_list) )$
166   \end{longtable}}
167
168 %    $( FOREACH sub_item = item.children_sorted )$
169 \hspace*{1.15cm}\rule{15.2cm}{0.2pt}\\
170 \hspace*{1.0cm}%
171 \parbox[t]{15.0cm}{%
172   \begin{longtable}{p{2.8cm}p{11.7cm}}
173     Unterfunktionsblock & $( KiviLatex.filter(sub_item.fb_number) )$                                       \\
174     Beschreibung        & $( KiviLatex.filter_html(sub_item.description_as_restricted_html) )$             \\
175     Abhängigkeiten      & $( KiviLatex.filter(sub_item.presenter.requirement_spec_item_dependency_list) )$
176   \end{longtable}}
177
178 %    $( END )$
179
180 %    $( UNLESS loop.last )$
181 \vspace{0.2cm}
182 \hrule
183 \vspace{0.4cm}
184
185 %    $( END )$
186
187 %  $( END )$
188 %
189 %$( END )$
190
191 %% Textblöcke dahinter
192 $( PROCESS text_block_outputter output_position=1 heading='Weitere Punkte' )$
193
194
195 \end{document}