test action
[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 %% Versionen
63 \newpage
64
65 \section{Versionen}
66
67 \vspace*{0.7cm}
68
69 %$( SET working_copy     = rspec.working_copy_id ? rspec.working_copy : rspec )$
70 %$( SET versioned_copies = rspec.version ? working_copy.versioned_copies_sorted(max_version_number = rspec.version.version_number) : working_copy.versioned_copies_sorted )$
71 %$( IF !versioned_copies.size )$
72   Bisher wurden noch keine Versionen angelegt.
73 %$( ELSE )$
74 \begin{longtable}{|p{2cm}|p{2cm}|p{12cm}|}
75   \hline
76   \multicolumn{1}{|r}{\small Version} &
77   \multicolumn{1}{|r|}{\small Datum} &
78   \small Beschreibung\\
79   \hline
80 %$( FOREACH versioned_copy = versioned_copies )$
81    \multicolumn{1}{|r}{\small $( KiviLatex.filter(versioned_copy.version.version_number) )$} &
82    \multicolumn{1}{|r|}{\small $( KiviLatex.filter(versioned_copy.version.itime.to_kivitendo(precision='minute')) )$} &
83    \small $( KiviLatex.filter(versioned_copy.version.description) )$\\
84 %$( END )$
85   \hline
86 \end{longtable}
87 %$( END )$
88
89 %$( BLOCK picture_outputter )$
90 %  $( SET width_cm = (picture.picture_width / 150.0) * 2.54 )$
91 %  $( SET width_cm = width_cm < 16.4 ? width_cm : 16.4 )$
92 \begin{figure}[h!]
93   \centering
94   \includegraphics[width=$( width_cm )$cm,keepaspectratio]{$( picture.print_file_name )$}
95
96 \mbox{Abbildung $( picture.number )$: $( KiviLatex.filter(picture.description ? picture.description : picture.picture_file_name) )$}
97 \end{figure}
98 %$( END )$
99
100 %$( BLOCK text_block_outputter )$
101 %  $( SET text_blocks = rspec.text_blocks_sorted(output_position=output_position) )$
102 %  $( IF text_blocks.size )$
103
104   \newpage
105
106   \section{$( heading )$}
107
108 %    $( FOREACH text_block = text_blocks )$
109
110     \subsection{$( KiviLatex.filter(text_block.title) )$}
111
112 $( KiviLatex.filter_html(text_block.text_as_restricted_html) )$
113
114 %      $( FOREACH picture = text_block.pictures_sorted.as_list )$
115 $( PROCESS picture_outputter picture=picture )$
116 %      $( END )$
117
118 %    $( END )$
119 %  $( END )$
120 %$( END )$
121
122 %% Textblöcke davor
123 $( PROCESS text_block_outputter output_position=0 heading='Allgemeines' )$
124
125 %% Abschnitte und Funktionsblöcke
126 \newpage
127
128 \section{Spezifikation}
129
130 \setlength{\LTpre}{-0.3cm}
131
132
133 %$( FOREACH top_item = rspec.sections_sorted )$
134
135   \subsection{Abschnitt $( KiviLatex.filter(top_item.fb_number) )$: $( KiviLatex.filter(top_item.title) )$}
136
137 %  $( IF top_item.description )$
138     $( KiviLatex.filter_html(top_item.description_as_restricted_html.replace('\r', '').replace('\n+\Z', '')) )$
139
140     \vspace{0.5cm}
141 %  $( END )$
142 %  $( FOREACH item = top_item.children_sorted )$
143 \parbox[t]{1.0cm}{\textcolor{kivitendodarkred}{$>>>$}}%
144 \parbox[t]{15.0cm}{%
145 \begin{longtable}{p{2.8cm}p{11.7cm}}
146   Funktionsblock & $( KiviLatex.filter(item.fb_number) )$\\
147   Beschreibung & $( KiviLatex.filter_html(item.description_as_restricted_html) )$\\
148   Abhängigkeiten & $( KiviLatex.filter(item.presenter.requirement_spec_item_dependency_list) )$
149 \end{longtable}}
150
151 %    $( FOREACH sub_item = item.children_sorted )$
152 \hspace*{1.15cm}\rule{15.2cm}{0.2pt}\\
153 \hspace*{1.0cm}%
154 \parbox[t]{15.0cm}{%
155 \begin{longtable}{p{2.8cm}p{11.7cm}}
156   Unterfunktionsblock & $( KiviLatex.filter(sub_item.fb_number) )$\\
157   Beschreibung & $( KiviLatex.filter_html(sub_item.description_as_restricted_html) )$\\
158   Abhängigkeiten & $( KiviLatex.filter(sub_item.presenter.requirement_spec_item_dependency_list) )$
159 \end{longtable}}
160
161 %    $( END )$
162
163 %    $( UNLESS loop.last )$
164 \vspace{0.2cm}
165 \hrule
166 \vspace{0.4cm}
167
168 %    $( END )$
169
170 %  $( END )$
171 %
172 %$( END )$
173
174 %% Textblöcke dahinter
175 $( PROCESS text_block_outputter output_position=1 heading='Weitere Punkte' )$
176
177
178 \end{document}