Pflichtenhefte: PDFs zu Arbeitskopie und Versionen erzeugen
[kivitendo-erp.git] / templates / print / Standard / requirement_spec.tex
diff --git a/templates/print/Standard/requirement_spec.tex b/templates/print/Standard/requirement_spec.tex
new file mode 100644 (file)
index 0000000..6580a8e
--- /dev/null
@@ -0,0 +1,162 @@
+% config: use-template-toolkit=1
+% config: tag-style=$( )$
+$( USE LxLatex )$
+$( USE P )$
+\documentclass{scrartcl}
+
+\usepackage[reqspeclogo,$( IF !rspec.version_id )$draftlogo$( ELSE )$secondpagelogo$( END )$]{kivitendo}
+
+\kivitendobgsettings
+
+\setlength{\LTpre}{0pt}
+\setlength{\LTpost}{0pt}
+
+\renewcommand{\kivitendosecondfoot}{%
+  \parbox{12cm}{%
+    \defaultfont\scriptsize%
+    $( LxLatex.filter(rspec.displayable_name) )$\\
+    $( !rspec.version_id ? "Arbeitskopie ohne Version" : "Version " _ rspec.version.version_number _ " vom " _ rspec.version.itime.to_kivitendo(precision='minute') )$
+
+    \vspace*{0.2cm}%
+    Seite \thepage%
+  }%
+}
+
+\reqspecsectionstyle
+
+\begin{document}
+
+%% Titelseite
+
+\setlongtables
+\defaultfont
+
+\begin{picture}(0,0)
+  \put(3.5,-5){%
+    \begin{minipage}[t][6cm]{12cm}
+      \Large
+      \textcolor{kivitendodarkred}{$( LxLatex.filter(rspec.type.description) )$}
+
+      \huge
+      $( LxLatex.filter(rspec.customer.name) )$
+
+      \vspace*{0.5cm}
+      \Large
+      $( LxLatex.filter(rspec.title) )$
+      \normalsize
+%$( IF rspec.version_id )$
+
+    Version $( LxLatex.filter(rspec.version.version_number) )$
+%$( END )$
+    \end{minipage}%
+  }
+\end{picture}
+
+%% Inhaltsverzeichnis
+
+%\newpage
+
+%\tableofcontents
+
+%% Versionen
+\newpage
+
+\section{Versionen}
+
+\vspace*{0.7cm}
+
+%$( SET working_copy     = rspec.working_copy_id ? rspec.working_copy : rspec )$
+%$( SET versioned_copies = rspec.version_id ? working_copy.versioned_copies_sorted(max_version_number = rspec.version.version_number) : working_copy.versioned_copies_sorted )$
+%$( IF !versioned_copies.size )$
+  Bisher wurden noch keine Versionen angelegt.
+%$( ELSE )$
+\begin{longtable}{|p{2cm}|p{2cm}|p{12cm}|}
+  \hline
+  \multicolumn{1}{|r}{\small Version} &
+  \multicolumn{1}{|r|}{\small Datum} &
+  \small Beschreibung\\
+  \hline
+%$( FOREACH versioned_copy = versioned_copies )$
+   \multicolumn{1}{|r}{\small $( LxLatex.filter(versioned_copy.version.version_number) )$} &
+   \multicolumn{1}{|r|}{\small $( LxLatex.filter(versioned_copy.version.itime.to_kivitendo(precision='minute')) )$} &
+   \small $( LxLatex.filter(versioned_copy.version.description) )$\\
+%$( END )$
+  \hline
+\end{longtable}
+%$( END )$
+
+%$( BLOCK text_block_outputter )$
+%  $( SET text_blocks = rspec.text_blocks_sorted(output_position=output_position) )$
+%  $( IF text_blocks.size )$
+
+  \newpage
+
+  \section{$( heading )$}
+
+%    $( FOREACH text_block = text_blocks )$
+
+    \subsection{$( LxLatex.filter(text_block.title) )$}
+
+$( LxLatex.filter(text_block.text) )$
+
+%    $( END )$
+%  $( END )$
+%$( END )$
+
+%% Textblöcke davor
+$( PROCESS text_block_outputter output_position=0 heading='Allgemeines' )$
+
+%% Abschnitte und Funktionsblöcke
+\newpage
+
+\section{Spezifikation}
+
+\setlength{\LTpre}{-0.3cm}
+
+
+%$( FOREACH top_item = rspec.sections_sorted )$
+
+  \subsection{Abschnitt $( LxLatex.filter(top_item.fb_number) )$: $( LxLatex.filter(top_item.title) )$}
+
+%  $( IF top_item.description )$
+    $( LxLatex.filter(top_item.description.replace('\r', '').replace('\n+\Z', '')) )$
+
+    \vspace{0.5cm}
+%  $( END )$
+%  $( FOREACH item = top_item.children_sorted )$
+\parbox[t]{1.0cm}{\textcolor{kivitendodarkred}{$>>>$}}%
+\parbox[t]{15.0cm}{%
+\begin{longtable}{p{2.8cm}p{11.7cm}}
+  Funktionsblock & $( LxLatex.filter(item.fb_number) )$\\
+  Beschreibung & $( LxLatex.filter(item.description) )$\\
+  Abhängigkeiten & $( LxLatex.filter(P.requirement_spec_item_dependency_list(item)) )$
+\end{longtable}}
+
+%    $( FOREACH sub_item = item.children_sorted )$
+\hspace*{1.15cm}\rule{15.2cm}{0.2pt}\\
+\hspace*{1.0cm}%
+\parbox[t]{15.0cm}{%
+\begin{longtable}{p{2.8cm}p{11.7cm}}
+  Unterfunktionsblock & $( LxLatex.filter(sub_item.fb_number) )$\\
+  Beschreibung & $( LxLatex.filter(sub_item.description) )$\\
+  Abhängigkeiten & $( LxLatex.filter(P.requirement_spec_item_dependency_list(sub_item)) )$
+\end{longtable}}
+
+%    $( END )$
+
+%    $( UNLESS loop.last )$
+\vspace{0.2cm}
+\hrule
+\vspace{0.4cm}
+
+%    $( END )$
+
+%  $( END )$
+%
+%$( END )$
+
+%% Textblöcke dahinter
+$( PROCESS text_block_outputter output_position=1 heading='Weitere Punkte' )$
+
+
+\end{document}