Pflichtenhefte: PDFs zu Arbeitskopie und Versionen erzeugen
[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_id )$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_id ? "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_id )$
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_id ? 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 text_block_outputter )$
89 %  $( SET text_blocks = rspec.text_blocks_sorted(output_position=output_position) )$
90 %  $( IF text_blocks.size )$
91
92   \newpage
93
94   \section{$( heading )$}
95
96 %    $( FOREACH text_block = text_blocks )$
97
98     \subsection{$( LxLatex.filter(text_block.title) )$}
99
100 $( LxLatex.filter(text_block.text) )$
101
102 %    $( END )$
103 %  $( END )$
104 %$( END )$
105
106 %% Textblöcke davor
107 $( PROCESS text_block_outputter output_position=0 heading='Allgemeines' )$
108
109 %% Abschnitte und Funktionsblöcke
110 \newpage
111
112 \section{Spezifikation}
113
114 \setlength{\LTpre}{-0.3cm}
115
116
117 %$( FOREACH top_item = rspec.sections_sorted )$
118
119   \subsection{Abschnitt $( LxLatex.filter(top_item.fb_number) )$: $( LxLatex.filter(top_item.title) )$}
120
121 %  $( IF top_item.description )$
122     $( LxLatex.filter(top_item.description.replace('\r', '').replace('\n+\Z', '')) )$
123
124     \vspace{0.5cm}
125 %  $( END )$
126 %  $( FOREACH item = top_item.children_sorted )$
127 \parbox[t]{1.0cm}{\textcolor{kivitendodarkred}{$>>>$}}%
128 \parbox[t]{15.0cm}{%
129 \begin{longtable}{p{2.8cm}p{11.7cm}}
130   Funktionsblock & $( LxLatex.filter(item.fb_number) )$\\
131   Beschreibung & $( LxLatex.filter(item.description) )$\\
132   Abhängigkeiten & $( LxLatex.filter(P.requirement_spec_item_dependency_list(item)) )$
133 \end{longtable}}
134
135 %    $( FOREACH sub_item = item.children_sorted )$
136 \hspace*{1.15cm}\rule{15.2cm}{0.2pt}\\
137 \hspace*{1.0cm}%
138 \parbox[t]{15.0cm}{%
139 \begin{longtable}{p{2.8cm}p{11.7cm}}
140   Unterfunktionsblock & $( LxLatex.filter(sub_item.fb_number) )$\\
141   Beschreibung & $( LxLatex.filter(sub_item.description) )$\\
142   Abhängigkeiten & $( LxLatex.filter(P.requirement_spec_item_dependency_list(sub_item)) )$
143 \end{longtable}}
144
145 %    $( END )$
146
147 %    $( UNLESS loop.last )$
148 \vspace{0.2cm}
149 \hrule
150 \vspace{0.4cm}
151
152 %    $( END )$
153
154 %  $( END )$
155 %
156 %$( END )$
157
158 %% Textblöcke dahinter
159 $( PROCESS text_block_outputter output_position=1 heading='Weitere Punkte' )$
160
161
162 \end{document}