瀏覽代碼

Rajout du lien sur les composants

idleman 8 年之前
父節點
當前提交
c755e44530
共有 2 個文件被更改,包括 36 次插入29 次删除
  1. 1 29
      component.php
  2. 35 0
      footer.php

+ 1 - 29
component.php

@@ -21,7 +21,7 @@
 						<tr data-id="{{id}}" style="display:none;">
 							<td>{{id}}</td>
 							<td><div class="componentImage"><img src="{{image}}"/></div></td>
-							<td>{{label}}</td>
+							<td><a href="{{link}}">{{label}}</a></td>
 							<td>{{brand}}</td>
 							<td>{{price}}</td>
 							<td>
@@ -34,35 +34,7 @@
 			</div>
 		</div>
 		
-	<!-- Modal -->
-	<div id="editComponent" class="modal fade" role="dialog" data-id="" data-action="save_component">
-	  <div class="modal-dialog">
 
-	    <!-- Modal content-->
-	    <div class="modal-content">
-	      <div class="modal-header">
-	        <button type="button" class="close" data-dismiss="modal">&times;</button>
-	        <h4 class="modal-title">Edition composant</h4>
-	      </div>
-	      <div class="modal-body">
-	      	<label for="label">Libellé</label>
-	        <input class="form-control" type="text" id="label"/>
-	        <label for="label">Marque</label>
-	        <input class="form-control" type="text" id="brand"/>
-	        <label for="label">Prix</label>
-	        <input class="form-control" type="text" id="price"/>
-			<label for="imageUpload">Image (fichier) (taille max : <?php echo max_upload_size(array(ALLOWED_RESOURCE_SIZE)); ?> )</label><br/>
-			<img src="img/default_image.png" style="width:100px;height:100px;" id="imageUpload"/>
-			
-	      </div>
-	      <div class="modal-footer">
-	      	<button type="button" class="btn btn-primary" onclick="save_component();" data-dismiss="modal">Enregistrer</button>
-	        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
-	      </div>
-	    </div>
-
-	  </div>
-	</div>
 			
 	<?php
 	 else: 

+ 35 - 0
footer.php

@@ -1,5 +1,40 @@
 </div>
 </div>
+
+
+
+		<!-- Modal component -->
+		<div id="editComponent" class="modal fade" role="dialog" data-id="" data-action="save_component">
+		  <div class="modal-dialog">
+
+			<!-- Modal content-->
+			<div class="modal-content">
+			  <div class="modal-header">
+				<button type="button" class="close" data-dismiss="modal">&times;</button>
+				<h4 class="modal-title">Edition composant</h4>
+			  </div>
+			  <div class="modal-body">
+				<label for="label">Libellé</label>
+				<input class="form-control" type="text" id="label"/>
+				<label for="brand">Marque</label>
+				<input class="form-control" type="text" id="brand"/>
+				<label for="price">Prix</label>
+				<input class="form-control" type="text" id="price"/>
+				<label for="link">Lien</label>
+				<input class="form-control" type="text" id="link"/>
+				<label for="imageUpload">Image (fichier) (taille max : <?php echo max_upload_size(array(ALLOWED_RESOURCE_SIZE)); ?> )</label><br/>
+				<img src="img/default_image.png" style="width:100px;height:100px;" id="imageUpload"/>
+				
+			  </div>
+			  <div class="modal-footer">
+				<button type="button" class="btn btn-primary" onclick="save_component();" data-dismiss="modal">Enregistrer</button>
+				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+			  </div>
+			</div>
+
+		  </div>
+		</div>
+
 		<!-- body -->
   
 		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>