Skip to content

Commit

Permalink
Allow to hide contact and register button.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarreirosdeoliveira committed May 18, 2016
1 parent 010745b commit 4d20c17
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 9 deletions.
4 changes: 3 additions & 1 deletion dist/idai-components-no-tpls.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ angular.module('idai.components')


/**
* @author: Daniel M. de Oliveira
* @author: Daniel de Oliveira
*/

.directive('idaiNavbar', function() {
Expand All @@ -138,6 +138,8 @@ angular.module('idai.components')
loginFunction: '&',
logoutFunction: '&',
hideSearchForm: '=',
hideRegisterButton: '=', // set "true" to hide it
hideContactButton: '=', // set "true" to hide it
projectId: '@'
},
templateUrl: 'partials/directives/idai-navbar.html',
Expand Down
2 changes: 1 addition & 1 deletion dist/idai-components-tpls.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions dist/idai-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ angular.module('idai.components')


/**
* @author: Daniel M. de Oliveira
* @author: Daniel de Oliveira
*/

.directive('idaiNavbar', function() {
Expand All @@ -138,6 +138,8 @@ angular.module('idai.components')
loginFunction: '&',
logoutFunction: '&',
hideSearchForm: '=',
hideRegisterButton: '=', // set "true" to hide it
hideContactButton: '=', // set "true" to hide it
projectId: '@'
},
templateUrl: 'partials/directives/idai-navbar.html',
Expand Down Expand Up @@ -843,7 +845,7 @@ try {
}
module.run(['$templateCache', function($templateCache) {
$templateCache.put('partials/directives/idai-navbar.html',
'<nav class="navbar navbar-default navbar-fixed-top" role=navigation><div style="padding-left:0px; position:relative"><div class=pull-left><ul class="nav navbar-nav"><li uib-dropdown><a href=# uib-dropdown-toggle><img src=img/kleinergreif.png id=brand-img> <b class=caret></b></a><ul uib-dropdown-menu><li><a href=http://www.dainst.org/de/forschung/forschung-digital/idai.welt target=_blank>iDAI.welt</a></li><li class=divider></li><li><a href="https://gazetteer.dainst.org/" target=_blank>iDAI.gazetteer</a></li><li><a href="http://geoserver.dainst.org/" target=_blank>iDAI.geoserver</a></li><li><a href="http://arachne.uni-koeln.de/" target=_blank>iDAI.objects&nbsp;/&nbsp;Arachne</a></li><li><a href=http://zenon.dainst.org target=_blank>iDAI.bibliography&nbsp;/&nbsp;Zenon</a></li><li><a href=http://archwort.dainst.org/thesaurus/de/vocab target=_blank>iDAI.vocab</a></li><li><a href=http://hellespont.dainst.org target=_blank>Hellespont</a></li></ul></li></ul></div><a href="/" id=projectLogo><img class=pull-left ng-src=img/logo_{{projectId}}.png style="height: 36px; margin-top: 8px;"></a></div><div class=navbar-header ng-init="isCollapsed = true"><button class=navbar-toggle ng-click="isCollapsed = !isCollapsed" type=button><span class=sr-only>Toggle navigation</span> <span class=icon-bar></span> <span class=icon-bar></span> <span class=icon-bar></span></button><form id=navbar-search ng-submit=search() ng-hide=hideSearchForm class="navbar-left navbar-form input-group form-inline" role=search><input autofocus type=text class=form-control placeholder="neue Suche" ng-model=q name=q> <span class="navbar-left input-group-btn"><button type=submit class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button></span></form></div><div ng-class="isCollapsed ? \'collapse\' : \'in\'" class="collapse navbar-collapse" uib-collapse=isCollapsed style=padding-left:10px><ul class="nav navbar-nav navbar-right"><li ng-repeat="link in dynamicLinkList"><a ng-click=toggleNavbar() ng-href=info/{{link.id}}>{{link.title}}</a></li><li><div ng-if=userObject.username ng-cloak uib-dropdown keyboard-nav><a href=bookmarks class="btn btn-default btn-sm navbar-btn" uib-dropdown-toggle><span class="glyphicon glyphicon-user"></span> &nbsp;{{userObject.username}} <span class=caret></span></a><ul uib-dropdown-menu role=menu style="margin-top:-11px; margin-right: 4px;"><div ng-include="\'partials/navbar-menu.html\'" include-replace></div><li class=divider></li><li><a ng-click=logoutFunction();><span class="glyphicon glyphicon-log-out"></span> &nbsp;{{\'navbar_sign_out\' | transl8}}</a></li></ul></div><div ng-if=!userObject.username ng-cloak class="btn-group btn-group-sm"><a type=button class="btn btn-default navbar-btn" ng-click=loginFunction();><b><span class="glyphicon glyphicon-log-in"></span> &nbsp;{{\'navbar_sign_in\' | transl8}}</b></a> <a ng-if=!userObject.username class="btn btn-default navbar-btn" href=register>{{\'navbar_sign_up\' | transl8}}</a></div></li><li style="margin-right:30px; margin-left: 5px;"><div><a type=button href=contact class="btn btn-sm btn-default navbar-btn"><span class="glyphicon glyphicon-envelope"></span></a></div></li></ul></div></nav>');
'<nav class="navbar navbar-default navbar-fixed-top" role=navigation><div style="padding-left:0px; position:relative"><div class=pull-left><ul class="nav navbar-nav"><li uib-dropdown><a href=# uib-dropdown-toggle><img src=img/kleinergreif.png id=brand-img> <b class=caret></b></a><ul uib-dropdown-menu><li><a href=http://www.dainst.org/de/forschung/forschung-digital/idai.welt target=_blank>iDAI.welt</a></li><li class=divider></li><li><a href="https://gazetteer.dainst.org/" target=_blank>iDAI.gazetteer</a></li><li><a href="http://geoserver.dainst.org/" target=_blank>iDAI.geoserver</a></li><li><a href="http://arachne.uni-koeln.de/" target=_blank>iDAI.objects&nbsp;/&nbsp;Arachne</a></li><li><a href=http://zenon.dainst.org target=_blank>iDAI.bibliography&nbsp;/&nbsp;Zenon</a></li><li><a href=http://archwort.dainst.org/thesaurus/de/vocab target=_blank>iDAI.vocab</a></li><li><a href=http://hellespont.dainst.org target=_blank>Hellespont</a></li></ul></li></ul></div><a href="/" id=projectLogo><img class=pull-left ng-src=img/logo_{{projectId}}.png style="height: 36px; margin-top: 8px;"></a></div><div class=navbar-header ng-init="isCollapsed = true"><button class=navbar-toggle ng-click="isCollapsed = !isCollapsed" type=button><span class=sr-only>Toggle navigation</span> <span class=icon-bar></span> <span class=icon-bar></span> <span class=icon-bar></span></button><form id=navbar-search ng-submit=search() ng-hide=hideSearchForm class="navbar-left navbar-form input-group form-inline" role=search><input autofocus type=text class=form-control placeholder="neue Suche" ng-model=q name=q> <span class="navbar-left input-group-btn"><button type=submit class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button></span></form></div><div ng-class="isCollapsed ? \'collapse\' : \'in\'" class="collapse navbar-collapse" uib-collapse=isCollapsed style=padding-left:10px><ul class="nav navbar-nav navbar-right"><li ng-repeat="link in dynamicLinkList"><a ng-click=toggleNavbar() ng-href=info/{{link.id}}>{{link.title}}</a></li><li><div ng-if=userObject.username ng-cloak uib-dropdown keyboard-nav><a href=bookmarks class="btn btn-default btn-sm navbar-btn" uib-dropdown-toggle><span class="glyphicon glyphicon-user"></span> &nbsp;{{userObject.username}} <span class=caret></span></a><ul uib-dropdown-menu role=menu style="margin-top:-11px; margin-right: 4px;"><div ng-include="\'partials/navbar-menu.html\'" include-replace></div><li class=divider></li><li><a ng-click=logoutFunction();><span class="glyphicon glyphicon-log-out"></span> &nbsp;{{\'navbar_sign_out\' | transl8}}</a></li></ul></div><div ng-if=!userObject.username ng-cloak class="btn-group btn-group-sm"><a type=button class="btn btn-default navbar-btn" ng-click=loginFunction();><b><span class="glyphicon glyphicon-log-in"></span> &nbsp;{{\'navbar_sign_in\' | transl8}}</b></a> <a ng-if="!hideRegisterButton && !userObject.username" class="btn btn-default navbar-btn" href=register>{{\'navbar_sign_up\' | transl8}}</a></div></li><li ng-if=!hideContactButton style=margin-left:5px><div><a type=button href=contact class="btn btn-sm btn-default navbar-btn"><span class="glyphicon glyphicon-envelope"></span></a></div></li><li style=margin-right:30px></li></ul></div></nav>');
}]);
})();

Expand Down
Loading

0 comments on commit 4d20c17

Please sign in to comment.