Просмотр исходного кода

Customer portal : Fixed home tiles disposition algo

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4067 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 9 лет назад
Родитель
Сommit
03dd2ff65f

+ 3 - 10
datamodels/2.x/itop-portal-base/portal/src/views/home/layout.html.twig

@@ -24,20 +24,13 @@
 <div class="container-fluid" id="main-wrapper">
 	<div class="row">
 		<div class="col-xs-12 col-sm-9 col-md-10 col-sm-offset-3 col-md-offset-2">
-		{% for i in 1..(app['combodo.portal.instance.conf'].bricks_total_width / 12)|round(0, 'ceil') %}
-			<section class="row row-eq-height-sm tiles_wrapper" {% if loop.first %}id="top_tiles_row"{% endif %}>
-				{% set iCurrentRowWidth = 0 %}
-				{% for brick in app['combodo.portal.instance.conf'].bricks|slice(iCurrentTileIndex, app['combodo.portal.instance.conf'].bricks|length) if iCurrentRowWidth < 12 %}
+			<section class="row tiles_wrapper">
+				{% for brick in app['combodo.portal.instance.conf'].bricks %}
 					{% if brick.GetVisibleHome %}
-						{% set iCurrentRowWidth = iCurrentRowWidth + brick.GetWidth %}
-						{% set iCurrentTileIndex = iCurrentTileIndex + 1 %}
-						{% if iCurrentRowWidth <= 12 %}
-							{% include '' ~ brick.GetTileTemplatePath with {brick: brick} %}
-						{% endif %}
+						{% include '' ~ brick.GetTileTemplatePath with {brick: brick} %}
 					{% endif %}
 				{% endfor %}
 			</section>
-		{% endfor %}
 		</div>
 	</div>
 </div>

+ 3 - 9
datamodels/2.x/itop-portal-base/portal/web/css/portal.css

@@ -115,7 +115,7 @@ footer{
 /******************/
 /* Global classes */
 /******************/
-@media (min-width: 768px) {
+/*@media (min-width: 768px) {
 	.row-eq-height-sm {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -138,7 +138,7 @@ footer{
 		display: -ms-flexbox;
 		display: flex;
 	}
-}
+}*/
 
 .vertical-center {
 	/* Make it a flex container */
@@ -295,12 +295,6 @@ label{
 .home #main-wrapper{
 	padding-top: 15px;
 }
-@media (min-width: 768px) {
-	.home .tiles_wrapper{
-		/*margin-bottom: 18px;*/
-		margin-bottom: 35px;
-	}
-}
 
 .home .tile{
 	margin-bottom: 8px;
@@ -332,7 +326,7 @@ label{
 }
 @media (min-width: 768px) {
 	.home .tile{
-		margin-bottom: 0px;
+		margin-bottom: 30px;
 		min-height: 10em;
 	}
 	.home .tile .tile_decoration{