Permalink
Browse files

SAKIII-4858 Enable configuration of the index.html/explore page

  • Loading branch information...
1 parent b020e1b commit c2c14d02e32bab941dd27a0b195beb1b5f92c1a3 @croby committed with Bert Pareyn Feb 4, 2012
Showing with 37 additions and 7 deletions.
  1. +22 −0 dev/configuration/config.js
  2. +13 −7 dev/index.html
  3. +2 −0 dev/javascript/explore.js
@@ -1954,6 +1954,28 @@ define(function(){
"columns": [["mygroups", "mycontacts"], ["mycontent", "recentmessages"]]
}
}
+ },
+
+ /**
+ * Explore (landing page/index.html) configuration
+ *
+ * oneRow: indicates if there should just be one row and one widget in
+ * that row. Requires widges.oneRowWidget to be set
+ * widgets: object that contains the widgets that should be in the
+ * landing page configuration
+ * rightColumn: The widget in the right column
+ * main: The widget on the top left
+ * bottom: The widget under the main widget
+ * oneRowWidget: When oneRow is set to true, this widget will be the
+ * only widget displayed on the page
+ */
+ explore : {
+ oneRow: false,
+ widgets: {
+ rightColumn: "recentactivity",
+ main: "welcome",
+ bottom: "featuredcontent"
+ }
}
};
View
@@ -32,18 +32,24 @@
</div>
</div>
<div class="fl-fix fl-centered fixed-container s3d-main-container">
- <div id="explore_content">
+ <div id="explore_content"></div>
+ <div class="s3d-bottom-spacer"></div>
+ </div>
+ <div id="explore_content_template"><!--
+ {if oneRow && widgets.oneRowWidget}
+ <div id="widget_${widgets.oneRowWidget}" class="widget_inline"></div>
+ {else}
<div id="explore_content_second_column">
- <div id="widget_recentactivity" class="widget_inline"></div>
+ <div id="widget_${widgets.rightColumn}" class="widget_inline"></div>
</div>
<div id="explore_content_first_column">
- <div id="widget_welcome" class="widget_inline"></div>
+ <div id="widget_${widgets.main}" class="widget_inline"></div>
<hr class="s3d-split-line"/>
- <div id="widget_featuredcontent" class="widget_inline"></div>
+ <div id="widget_${widgets.bottom}" class="widget_inline"></div>
</div>
- </div>
- <div class="s3d-bottom-spacer"></div>
- </div>
+ {/if}
+ --></div>
+
<!-- FOOTER WIDGET -->
<div id="widget_footer" class="widget_inline footercontainer"></div>
@@ -23,6 +23,8 @@ require(["jquery","sakai/sakai.api.core"], function($, sakai) {
if (sakai.config.enableCategories) {
sakai.api.Util.TemplateRenderer($("#explore_categories_template"), {}, $("#explore_categories"));
}
+
+ sakai.api.Util.TemplateRenderer($("#explore_content_template"), sakai.config.explore, $("#explore_content"));
};
doInit();
};

0 comments on commit c2c14d0

Please sign in to comment.