Skip to content

Instantly share code, notes, and snippets.

@xmas
Created February 25, 2016 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xmas/d10cfd3163c3ab241309 to your computer and use it in GitHub Desktop.
Save xmas/d10cfd3163c3ab241309 to your computer and use it in GitHub Desktop.
<aura:component implements="flexipage:availableForAllPageTypes" controller="InsightNavController">
<ltng:require styles="/resource/SLDS0122/assets/styles/salesforce-lightning-design-system-ltng.css,/resource/jquery_ui_css" scripts="/resource/jquery_js,/resource/jquery_ui_js" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<aura:attribute name="typedata" type="List" />
<aura:attribute name="reports" type="List" />
<aura:attribute name="typedata-base" type="List" />
<aura:attribute name="reports-base" type="List" />
<aura:handler event="c:SearchKeyChange" action="{!c.searchKeyChange}"/>
<div class="slds slds-box slds-p-right--medium lds-p-left--medium slds-p-top--medium slds-p-bottom--medium" style="background:#081430">
<div class="slds slds-p-right--medium lds-p-left--medium slds-p-top--medium slds-p-bottom--medium">
<c:SearchBar/>
<div class="sslds-text-heading--label" style="color:white"><b>Insight Objects</b></div>
<br></br>
<aura:renderIf isTrue="{!v.typedata.length > 0}">
<ul class="slds-list--vertical">
<div class="slds-text-body--small">
<c:insightListItem objID="ALL" title="Show All"/>
</div>
<SPAN>
<aura:iteration items="{!v.typedata}" var="tdata" indexVar="indx">
<aura:if isTrue="{!tdata.isHyperlink}">
<li>
<div class="slds-tile slds-p-top--small slds-text-body--small">
<c:insightListItem objID="{!tdata.fieldValue}" title="{!tdata.fieldName}"/> ({!tdata.count})
</div>
</li>
<aura:set attribute="else">
<aura:if isTrue="{!indx != 0}">
<li class="slds-list__item slds-has-divider--top-space "></li>
</aura:if>
<h3 class="slds-text-heading--label slds-p-top--small">{!tdata.fieldName}</h3>
</aura:set>
</aura:if>
</aura:iteration>
</SPAN>
</ul>
</aura:renderIf>
<hr></hr>
<div class="sslds-text-heading--label" style="color:white"><b>Reports</b></div>
<br></br>
<aura:renderIf isTrue="{!v.reports.length > 0}">
<ul class="slds-list--vertical">
<SPAN>
<aura:iteration items="{!v.reports}" var="report" indexVar="indx">
<li>
<div class="slds-tile slds-p-top--small slds-text-body--small">
<c:insightListItem report="{!report.ReportID__c}" title="{!report.Data_Source__c}"/> ({!report.expr0})
</div>
</li>
</aura:iteration>
</SPAN>
</ul>
</aura:renderIf>
</div>
</div>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment