Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Fix guest mode filter #404

Merged
merged 4 commits into from
Feb 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2 tabindex="0">
<a class="btn btn-disabled" href ng-hide="portlet.canAdd" popover="You do not have access to this app" popover-trigger="mouseenter" popover-placement="top" popover-popup-delay="500"><span class="fa fa-arrow-circle-o-right"></span>Launch</a>
</div>
<div class="action-buttons" ng-show="GuestMode">
<a class="btn btn-primary" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
<a class="btn btn-outline" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
Login to use
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ <h2 tabindex="0">
<a class="btn btn-disabled" href ng-hide="portlet.canAdd" popover="You do not have access to this app" popover-trigger="mouseenter" popover-placement="top" popover-popup-delay="500"><span class="fa fa-arrow-circle-o-right"></span>Launch</a>

</div>
<!--GuestMode buttons-->
<div class="action-buttons" ng-show="GuestMode">
<a class="btn btn-primary" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
<a class="btn btn-outline" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
Login to use
</a>
</div>
Expand All @@ -47,7 +48,7 @@ <h2 tabindex="0">
<span><rating ng-model="portlet.rating" readonly="true" class="rating"></rating>
( {{::portlet.userRated}} rating<span ng-if="portlet.userRated !== 1">s</span> )
</span>
<span> | <button ng-hide="GuestMode" ng-click="openRating('sm',portlet.fname, portlet.title)" class="btn btn-default">Rate</button></span>
<span ng-hide="GuestMode"> | <button ng-click="openRating('sm',portlet.fname, portlet.title)" class="btn btn-default">Rate</button></span>
<p tabindex="0">{{::portlet.description}}</p>
<div class="category-list">
<a ng-repeat="category in portlet.categories" href="" ng-click="selectFilter('category',category)" class="category-links">{{::category}}</a>
Expand All @@ -62,7 +63,7 @@ <h2 tabindex="0">
<div class="visible-xs text-center">
<div ng-show="GuestMode">
<div>
<a class="btn btn-primary" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
<a class="btn btn-outline" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
Login to use
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ define(['angular', 'portal/search/controllers', 'my-app/marketplace/controllers'
}
};
}]);
app.controller('SearchResultController',
['$scope', '$controller','marketplaceService', 'googleCustomSearchService', 'wiscDirectorySearchService',
function($scope, $controller,marketplaceService, googleCustomSearchService, wiscDirectorySearchService) {

app.controller('SearchResultController',
['$rootScope', '$scope', '$controller','marketplaceService', 'googleCustomSearchService', 'wiscDirectorySearchService',
function($rootScope, $scope, $controller,marketplaceService, googleCustomSearchService, wiscDirectorySearchService) {
var base = $controller('marketplaceCommonFunctions', {$scope : $scope});

var initWiscEduSearch = function(){
Expand Down Expand Up @@ -78,7 +78,7 @@ define(['angular', 'portal/search/controllers', 'my-app/marketplace/controllers'
}
);
};

$scope.filterTo = function(filterName) {
$('.search-results .inner-nav li').removeClass('active');
if (filterName == 'all') {
Expand Down Expand Up @@ -115,7 +115,7 @@ define(['angular', 'portal/search/controllers', 'my-app/marketplace/controllers'
$('#wiscDirectorySeeMoreResults').hide();
}
};

var initwiscDirectoryResultLimit = function(){
$scope.wiscDirectoryResultLimit = 3;
}
Expand All @@ -132,7 +132,7 @@ define(['angular', 'portal/search/controllers', 'my-app/marketplace/controllers'
$scope.googleEmptyResults = false;
$scope.totalCount = 0;
$scope.searchResultLimit = 20;
$scope.showAll = false;
$scope.showAll = $rootScope.GuestMode || false;
base.setupSearchTerm();
base.initializeConstants();
//get marketplace entries
Expand Down Expand Up @@ -164,4 +164,3 @@ define(['angular', 'portal/search/controllers', 'my-app/marketplace/controllers'
return app;

});

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h4><a href="{{::portlet.maxUrl}}" target="{{::portlet.target}}">{{ portlet.name
</p>
<p ng-show="GuestMode">
<span style='margin-right: 10px;'>
<a class="btn btn-flat" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
<a class="btn btn-outline" ng-href="{{loginToAuthPage + '/web/apps/details/'+ portlet.fname}}" >
Login to use
</a>
</span>
Expand Down
28 changes: 28 additions & 0 deletions angularjs-portal-mock-portal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Howdy, here are some suggestions on how you can best use the mock-portal instance.

### Configure for guest

Change your `app-config.js` like this:

```diff
@@ -16,18 +16,18 @@ define(['angular'], function(angular) {
})
.constant('SERVICE_LOC', {
'aboutURL' : '/portal/web/session.json',
- 'sessionInfo' : '/portal/web/session.json',
+ 'sessionInfo' : '/portal/web/guest-session.json',
'sidebarInfo' : '/web/staticFeeds/sidebar.json',
'featuresInfo' : '/web/staticFeeds/features.json',
'newstuffInfo': '/web/staticFeeds/new-stuff.json',
'context' : '/portal/',
'base' : '/portal/web/',
- 'layout' : 'layoutDoc?tab=UW Bucky Home',
+ 'layout' : 'layoutDocGuest.json',
'layoutTab' : 'UW Bucky Home',
'marketplace' : {
'base' : 'marketplace/',
'entry' : 'entry/',
- 'entries' : 'entries.json'
+ 'entries' : 'entries-guest.json'
},
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"layout":[
{
"nodeId":"u23l1n11",
"title":"Search with the Bing",
"description":"Testing out widget template swl.",
"url":"https://www.bing.com/",
"iconUrl":null,
"faIcon":"fa-windows",
"fname":"bing-search",
"target":null,
"widgetURL":null,
"widgetType":"search-with-links",
"widgetConfig": { "actionURL" : "https://www.bing.com", "actionTarget" : "_blank", "actionParameter" : "q", "launchText":"Launch Bing","links": [{"title":"Interweb Search", "href":"http://www.bing.com", "icon":"fa-search","target":"_blank"}, {"title":"Image Search", "href":"https://www.bing.com/images", "icon":"fa-camera","target":"_blank"}]},
"staticContent":null,
"pithyStaticContent":null,
"altMaxUrl":false
},
{
"nodeId":"n777",
"title":"Weather",
"description":"Access the latest weather conditions and 5-day forecasts for the cities you select.",
"url":"/web/staticFeeds/weather.json",
"iconUrl":null,
"faIcon":"fa-sun-o",
"fname":"weather",
"target":null,
"widgetURL":"/web/staticFeeds/weather-multiple.json",
"widgetType":"weather",
"widgetTemplate":null,
"widgetConfig":{
"iconPrefix":"https://raw.githubusercontent.com/Jasig/WeatherPortlet/WeatherPortlet-1.1.3/src/main/webapp/images/accuweather/",
"iconPostfix":".png"
},
"staticContent":null,
"pithyStaticContent":null,
"altMaxUrl":false
},

{
"nodeId":"u23l1n15",
"title":"Course Guide",
"description":"Find courses by title, college, department, school, or instructor.",
"url":"/portal/f/u23l1s4/normal/render.uP",
"iconUrl":null,
"faIcon":"fa-compass",
"fname":"CourseGuide-Browse-Courses",
"target":null,
"widgetURL":null,
"widgetType":"generic",
"widgetTemplate":"\n <div>\n <div class='display-block center' style='max-width: 95%; margin: auto;'>\n <form class='form-inline' action='/portal/p/CourseGuide-Browse-Courses/detached/action.uP?pCm=view&amp;pP_action=advancedSearch' method='post' target='_blank'>\n <div class='input-group'> <input type='text' class='form-control' id='keywordSearch' name='keywordSearch' placeholder='Search for courses'> <span class='input-group-btn'> <button type='submit' class='btn btn-primary' style='margin: 0;'><i class='fa fa-search hidden-xs'></i><span class='visible-xs'>Search</span></button> </span> </div>\n </form>\n <div style='background-color: #EAEAEA; border-radius:4px;padding:10px; margin-top:10px;'>\n <span class='bold display-block left' style='text-align: left; padding-left: 10px; font-size: 14px;'>Use My Course Guide for more options:</span> \n <ul style='text-align: left;list-style-type: disc; font-size: 12px;'>\n <li>Search by term</li>\n <li>Search by instructor</li>\n <li>Browse by subject</li>\n <li>Plan your degree</li>\n </ul>\n </div>\n </div>\n <a class='btn btn-default launch-app-button ng-scope' href='/portal/p/CourseGuide-Browse-Courses/detached/action.uP?pCm=view&amp;pP_action=advancedSearch' target='_blank'>Go to my course guide</a>\n </div>\n ",
"widgetConfig":null,
"staticContent":null,
"pithyStaticContent":null,
"altMaxUrl":false
},
{
"nodeId":"u23l1n22",
"title":"Course Guide Help",
"description":"Help that matters mosts",
"url":"/web/",
"iconUrl":null,
"faIcon":"fa-compass",
"fname":"CourseGuide-Help",
"target":null,
"widgetURL": "http://kb.wisc.edu/enrollment/topic_rss.php?cat=52000",
"widgetType":"rss",
"widgetConfig": {"lim" : 3, "showdate": true, "dateFormat" : "M/d"},
"staticContent":null,
"pithyStaticContent":null,
"altMaxUrl":false
},
{
"nodeId":"u23l1n22",
"title":"Course Guide News",
"description":"News that matters mosts",
"url":"/web/",
"iconUrl":null,
"faIcon":"fa-compass",
"fname":"CourseGuide-Help",
"target":null,
"widgetURL": "https://kb.wisc.edu/enrollment/news_rss.php",
"widgetType":"rss",
"widgetConfig":null,
"staticContent":null,
"pithyStaticContent":null,
"altMaxUrl":false
}
]
}
Loading