Robert Marshall 10 lat temu
rodzic
commit
56ea8181c1
1 zmienionych plików z 75 dodań i 26 usunięć
  1. 75 26
      View/Gallery/manage.view

+ 75 - 26
View/Gallery/manage.view

@@ -1,4 +1,29 @@
 @Title{Gallery}@
+@CSS{
+	#main-header{
+		box-shadow:none !important;
+	}
+
+	#tabs{
+		background:#f44336;
+		margin:-20px;
+		margin-bottom:10px;
+		position:fixed;
+		width:100%;
+	}
+
+	#tabs a{
+		display:inline-block;
+		color:#ffccbc;
+		padding:15px 30px;
+		text-decoration:none;
+	}
+	
+	#tabs a.active{
+		color:#fff;
+		border-bottom:3px solid #fff;
+	}
+}@
 @CSSSmall{
 	@media(orientation:portrait){
 		td:nth-child(3), th:nth-child(3){
@@ -22,31 +47,55 @@
 		<img src="/images/add_album.svg" alt="Add Album" />
 	</button>
 }@
+@JavaScript{
+	$(function(){
+		$("#tabs>a").click(function(){
+			$("#tabs-content>*").hide();
+			$($(this).attr("href")).show();
+			$("#tabs>a").removeClass("active");
+			$(this).addClass("active");
+			
+			return false;
+		});
+		
+		$("#tabs a.active").click();
+	});
+}@
 @Body{
-<form action="" method="post" id="manageForm">
-	<input type="hidden" name="formSubmitted" value="yes" />
-	<table>
-		<tr>
-			<th>ID</th>
-			<th>Title</th>
-			<th>Timestamp</th>
-			<th>Actions</th>
-		</tr>
-		<?php foreach ($albums as $album){?>
-		<tr>
-			<td><?=$album->AlbumId?></td>
-			<td><a href="/gallery/view/<?=$album->AlbumUrl?>"><?=$album->AlbumTitle?></a></td>
-			<td><?=$album->AlbumTimestamp?></td>
-			<td>
-				<button value="<?=$album->AlbumId?>" name="delete" title="Delete">
-					<img src="/images/delete.svg" alt="Delete" />
-				</button>
-				<button value="/blog/edit/<?=$album->AlbumId?>" name="edit" title="Edit" class="jsNav">
-					<img src="/images/edit.svg" alt="Edit" />
-				</button>
-			</td>
-		</tr>
-		<?php } ?>
-	</table>
-</form>
+<div id="tabs">
+	<a class="active" href="#images">Images</a><a href="#albums">Albums</a>
+</div>
+<div id="tabs-content" style="margin-top:55px">
+	<div id="images">
+			asdasd
+	</div>
+	<div id="albums">
+		<form action="" method="post" id="manageForm">
+			<input type="hidden" name="formSubmitted" value="yes" />
+			<table>
+				<tr>
+					<th>ID</th>
+					<th>Title</th>
+					<th>Timestamp</th>
+					<th>Actions</th>
+				</tr>
+				<?php foreach ($albums as $album){?>
+				<tr>
+					<td><?=$album->AlbumId?></td>
+					<td><a href="/gallery/view/<?=$album->AlbumUrl?>"><?=$album->AlbumTitle?></a></td>
+					<td><?=$album->AlbumTimestamp?></td>
+					<td>
+						<button value="<?=$album->AlbumId?>" name="delete" title="Delete">
+							<img src="/images/delete.svg" alt="Delete" />
+						</button>
+						<button value="/blog/edit/<?=$album->AlbumId?>" name="edit" title="Edit" class="jsNav">
+							<img src="/images/edit.svg" alt="Edit" />
+						</button>
+					</td>
+				</tr>
+				<?php } ?>
+			</table>
+		</form>
+	</div>
+</div>
 }@