Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / templates / print / Standard / 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 \usepackage{CJKutf8}
29 \usepackage{CJKfntef}
30 \usepackage[T1]{fontenc}
31
32 \begin{document}
33 \begin{CJK}{UTF8}{}
34
35 %% Titelseite
36
37 \setlongtables
38 \defaultfont
39
40 \begin{picture}(0,0)
41   \put(3.5,-5){%
42     \begin{minipage}[t][6cm]{12cm}
43       \Large
44       \textcolor{kivitendodarkred}{$( KiviLatex.filter(rspec.type.description) )$}
45
46       \huge
47       $( KiviLatex.filter(rspec.customer.name) )$
48
49       \vspace*{0.5cm}
50       \Large
51       $( KiviLatex.filter(rspec.title) )$
52       \normalsize
53 %$( IF rspec.version )$
54
55     Version $( KiviLatex.filter(rspec.version.version_number) )$
56 %$( END )$
57     \end{minipage}%
58   }
59 \end{picture}
60
61 %% Inhaltsverzeichnis
62
63 %\newpage
64
65 %\tableofcontents
66
67 %% Versionen
68 \newpage
69
70 \section{Versionen}
71
72 \vspace*{0.7cm}
73
74 %$( SET working_copy     = rspec.working_copy_id ? rspec.working_copy : rspec )$
75 %$( SET versioned_copies = rspec.version ? working_copy.versioned_copies_sorted(max_version_number = rspec.version.version_number) : working_copy.versioned_copies_sorted )$
76 %$( IF !versioned_copies.size )$
77   Bisher wurden noch keine Versionen angelegt.
78 %$( ELSE )$
79 \begin{longtable}{|p{2cm}|p{2cm}|p{12cm}|}
80   \hline
81   \multicolumn{1}{|r}{\small Version} &
82   \multicolumn{1}{|r|}{\small Datum} &
83   \small Beschreibung\\
84   \hline
85 %$( FOREACH versioned_copy = versioned_copies )$
86    \multicolumn{1}{|r}{\small $( KiviLatex.filter(versioned_copy.version.version_number) )$} &
87    \multicolumn{1}{|r|}{\small $( KiviLatex.filter(versioned_copy.version.itime.to_kivitendo(precision='minute')) )$} &
88    \small $( KiviLatex.filter(versioned_copy.version.description) )$\\
89 %$( END )$
90   \hline
91 \end{longtable}
92 %$( END )$
93
94 %$( BLOCK picture_outputter )$
95 %  $( SET width_cm = (picture.picture_width / 150.0) * 2.54 )$
96 %  $( SET width_cm = width_cm < 16.4 ? width_cm : 16.4 )$
97 \begin{figure}[h!]
98   \centering
99   \includegraphics[width=$( width_cm )$cm,keepaspectratio]{$( picture.print_file_name )$}
100
101 \mbox{Abbildung $( picture.number )$: $( KiviLatex.filter(picture.description ? picture.description : picture.picture_file_name) )$}
102 \end{figure}
103 %$( END )$
104
105 %$( BLOCK text_block_outputter )$
106 %  $( SET text_blocks = rspec.text_blocks_sorted(output_position=output_position) )$
107 %  $( IF text_blocks.size )$
108
109   \newpage
110
111   \section{$( heading )$}
112
113 %    $( FOREACH text_block = text_blocks )$
114
115     \subsection{$( KiviLatex.filter(text_block.title) )$}
116
117 $( KiviLatex.filter_html(text_block.text_as_restricted_html) )$
118
119 %      $( FOREACH picture = text_block.pictures_sorted.as_list )$
120 $( PROCESS picture_outputter picture=picture )$
121 %      $( END )$
122
123 %    $( END )$
124 %  $( END )$
125 %$( END )$
126
127 %% Textblöcke davor
128 $( PROCESS text_block_outputter output_position=0 heading='Allgemeines' )$
129
130 %% Abschnitte und Funktionsblöcke
131 \newpage
132
133 \section{Spezifikation}
134
135 \setlength{\LTpre}{-0.3cm}
136
137
138 %$( FOREACH top_item = rspec.sections_sorted )$
139
140   \subsection{Abschnitt $( KiviLatex.filter(top_item.fb_number) )$: $( KiviLatex.filter(top_item.title) )$}
141
142 %  $( IF top_item.description )$
143     $( KiviLatex.filter_html(top_item.description_as_restricted_html.replace('\r', '').replace('\n+\Z', '')) )$
144
145     \vspace{0.5cm}
146 %  $( END )$
147 %  $( FOREACH item = top_item.children_sorted )$
148 \parbox[t]{1.0cm}{\textcolor{kivitendodarkred}{$>>>$}}%
149 \parbox[t]{15.0cm}{%
150 \begin{longtable}{p{2.8cm}p{11.7cm}}
151   Funktionsblock & $( KiviLatex.filter(item.fb_number) )$\\
152   Beschreibung & $( KiviLatex.filter_html(item.description_as_restricted_html) )$\\
153   Abhängigkeiten & $( KiviLatex.filter(P.requirement_spec_item_dependency_list(item)) )$
154 \end{longtable}}
155
156 %    $( FOREACH sub_item = item.children_sorted )$
157 \hspace*{1.15cm}\rule{15.2cm}{0.2pt}\\
158 \hspace*{1.0cm}%
159 \parbox[t]{15.0cm}{%
160 \begin{longtable}{p{2.8cm}p{11.7cm}}
161   Unterfunktionsblock & $( KiviLatex.filter(sub_item.fb_number) )$\\
162   Beschreibung & $( KiviLatex.filter_html(sub_item.description_as_restricted_html) )$\\
163   Abhängigkeiten & $( KiviLatex.filter(P.requirement_spec_item_dependency_list(sub_item)) )$
164 \end{longtable}}
165
166 %    $( END )$
167
168 %    $( UNLESS loop.last )$
169 \vspace{0.2cm}
170 \hrule
171 \vspace{0.4cm}
172
173 %    $( END )$
174
175 %  $( END )$
176 %
177 %$( END )$
178
179 %% Textblöcke dahinter
180 $( PROCESS text_block_outputter output_position=1 heading='Weitere Punkte' )$
181
182 \end{CJK}
183 \end{document}