From bbce6055d82ac6f2fa7b8bcd3a256c7f2cc938d4 Mon Sep 17 00:00:00 2001
From: damjan <damjan@sgalinski.de>
Date: Mon, 7 Sep 2015 19:45:10 +0200
Subject: [PATCH] [TASK] Refactoring - making partials

---
 .../Private/Partials/NavigationSidebar.html   | 15 ++++++++++++++
 .../Private/Partials/ResourcesInclusion.html  |  3 +++
 Resources/Private/Templates/Tsref/Index.html  | 20 ++-----------------
 3 files changed, 20 insertions(+), 18 deletions(-)
 create mode 100644 Resources/Private/Partials/NavigationSidebar.html
 create mode 100644 Resources/Private/Partials/ResourcesInclusion.html

diff --git a/Resources/Private/Partials/NavigationSidebar.html b/Resources/Private/Partials/NavigationSidebar.html
new file mode 100644
index 0000000..c645bf1
--- /dev/null
+++ b/Resources/Private/Partials/NavigationSidebar.html
@@ -0,0 +1,15 @@
+<div class="col-sm-3 col-md-2 sidebar">
+	<ul class="nav nav-sidebar">
+		<f:for each="{types}" as="type">
+			<li class="{f:if(condition: '{selectedType.id} == {type.id}', then: 'active')}">
+				<f:link.action package="SGalinski.TypoScriptReferenceFrontend" controller="tsref" action="index"
+					arguments="{typeId: type.id}">
+					{type.id} {type.name}
+					<f:if condition="{selectedType.id} == {type.id}">
+						<span class="sr-only">(current)</span>
+					</f:if>
+				</f:link.action>
+			</li>
+		</f:for>
+	</ul>
+</div>
diff --git a/Resources/Private/Partials/ResourcesInclusion.html b/Resources/Private/Partials/ResourcesInclusion.html
new file mode 100644
index 0000000..3b970e3
--- /dev/null
+++ b/Resources/Private/Partials/ResourcesInclusion.html
@@ -0,0 +1,3 @@
+<link href="{f:uri.resource(package: 'SGalinski.TypoScriptReferenceFrontend', path: 'css/bootstrap.min.css')}" rel="stylesheet" />
+<link href="{f:uri.resource(package: 'SGalinski.TypoScriptReferenceFrontend', path: 'css/dashboard.css')}" rel="stylesheet" />
+<link href="{f:uri.resource(package: 'SGalinski.TypoScriptReferenceFrontend', path: 'css/Tsref.css')}" rel="stylesheet" />
diff --git a/Resources/Private/Templates/Tsref/Index.html b/Resources/Private/Templates/Tsref/Index.html
index e97d9e0..1fa399d 100644
--- a/Resources/Private/Templates/Tsref/Index.html
+++ b/Resources/Private/Templates/Tsref/Index.html
@@ -4,27 +4,11 @@
 <f:section name="Title">TypoScript reference</f:section>
 
 <f:section name="Content">
-	<link href="{f:uri.resource(package: 'SGalinski.TypoScriptReferenceFrontend', path: 'css/bootstrap.min.css')}" rel="stylesheet" />
-	<link href="{f:uri.resource(package: 'SGalinski.TypoScriptReferenceFrontend', path: 'css/dashboard.css')}" rel="stylesheet" />
-	<link href="{f:uri.resource(package: 'SGalinski.TypoScriptReferenceFrontend', path: 'css/Tsref.css')}" rel="stylesheet" />
+	<f:render partial="ResourcesInclusion" arguments="{_all}" />
 
 	<div class="container-fluid">
 		<div class="row">
-			<div class="col-sm-3 col-md-2 sidebar">
-				<ul class="nav nav-sidebar">
-					<f:for each="{types}" as="type">
-						<li class="{f:if(condition: '{selectedType.id} == {type.id}', then: 'active')}">
-							<f:link.action package="SGalinski.TypoScriptReferenceFrontend" controller="tsref" action="index"
-								arguments="{typeId: type.id}">
-								{type.id} {type.name}
-								<f:if condition="{selectedType.id} == {type.id}">
-									<span class="sr-only">(current)</span>
-								</f:if>
-							</f:link.action>
-						</li>
-					</f:for>
-				</ul>
-			</div>
+			<f:render partial="NavigationSidebar" arguments="{_all}" />
 
 			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
 				<h1 class="page-header">{selectedType.name}</h1>
-- 
GitLab