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