-
-
Save PirosB3/3984050 to your computer and use it in GitHub Desktop.
new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SidebarController($scope, $http) { | |
$http.get('api/factions').success(function(data) { | |
$scope.factions = data; | |
}); | |
$http.get('api/countries').success(function(data) { | |
$scope.countries = data; | |
}); | |
} | |
function MepListController($scope, $http, $routeParams) { | |
debugger; | |
} | |
angular.module('TweetYourMep', []). | |
config(['$routeProvider', function($routeProvider) { | |
$routeProvider.when('/name/:name/country/:default/localParty/:localParty/faction/:faction', { controller: MepListController} ); | |
$routeProvider.otherwise({redirectTo: '/name/all/country/all/localParty/all/faction/all'}); | |
}]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title><%= config.app_title %></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="<%= config.app_description %>"> | |
<!-- <meta name="author" content="https://github.com/spaghetti-open-data/tweetyourmep/graphs/contributors"> --> | |
<!-- Le styles --> | |
<link href="<%= config.base_path %>bootstrap/css/bootstrap_united.min.css" rel="stylesheet"> | |
<link href="<%= config.base_path %>bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> | |
<link href="<%= config.base_path %>stylesheets/application.css" rel="stylesheet"> | |
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<!-- Le fav and touch icons | |
<link rel="shortcut icon" href="../assets/ico/favicon.ico"> | |
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"> | |
--> | |
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-35090580-1']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
})(); | |
</script> | |
</head> | |
<body> | |
<div class="navbar navbar-fixed-top"> | |
<div class="navbar-inner"> | |
<div class="container-fluid"> | |
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</a> | |
<a class="brand" href="<%= config.base_path %>"><%= config.app_title %></a> | |
<div class="nav-collapse collapse"> | |
<!-- | |
<p class="navbar-text pull-right"> | |
Logged in as <a href="#" class="navbar-link">Username</a> | |
</p> | |
--> | |
<ul class="nav"> | |
<li class="active"><a href="<%= config.base_path %>">Home</a></li> | |
<li><a href="<%= config.base_path %>about">About</a></li> | |
<li><a href="<%= config.base_path %>italiano">Italiano</a></li> | |
<!-- <li><a href="#contact">Contact</a></li> --> | |
</ul> | |
</div><!--/.nav-collapse --> | |
</div> | |
</div> | |
</div> | |
<!--DEFINED NG-APP HERE--> | |
<div class="container-fluid" ng-app="TweetYourMep"> | |
<div class="row-fluid"> | |
<div class="span3"> | |
<div class="well sidebar-nav"> | |
<ul class="nav nav-list"> | |
<h5> | |
<img src="https://dev.twitter.com/sites/default/files/images_documentation/bird_blue_16.png"> | |
<a href="https://twitter.com/search?q=%23tweetyourmep" target="_blank">Search #tweetyourmep</a> | |
</h5> | |
<li> | |
<form class="form-vertical" ng-controller="SidebarController"> | |
<fieldset> | |
<div id="legend" class=""> | |
<legend class="">Search your MEP</legend> | |
</div> | |
<div class="control-group"> | |
<!-- Search input--> | |
<label class="control-label">Name</label> | |
<div class="controls"> | |
<input type="text" name="mep_name" placeholder="MEP Name" class="input-medium search-query" > | |
<p class="help-block"></p> | |
</div> | |
<!-- | |
Search for faction TODO | |
--> | |
<div class="controls"> | |
<label class="control-label">Local Party</label> | |
<input type="text" name="mep_localParty" placeholder="MEP Local Party" class="input-medium search-query" > | |
<p class="help-block"></p> | |
</div> | |
</div> | |
<div class="control-group"> | |
<!-- Select Basic --> | |
<label class="control-label">Country</label> | |
<div class="controls"> | |
<select class="input-medium" name="mep_country" id="mep_country"> | |
<option value="{{ country.code }}" ng-repeat="country in countries"> {{ country.name }} </option> | |
</select> | |
</div> | |
</div> | |
<div class="control-group"> | |
<label class="control-label">Faction</label> | |
<div class="controls"> | |
<select class="input-medium" name="mep_faction" id="mep_faction"> | |
<option value="{{ faction.code }}" ng-repeat="faction in factions"> {{ faction.name }} </option> | |
</select> | |
</div> | |
</div> | |
<div class="control-group"> | |
<label class="control-label"></label> | |
<!-- Button --> | |
<div class="controls"> | |
<button class="btn btn-success">Search</button> | |
</div> | |
</div> | |
</fieldset> | |
</form> | |
</li> | |
</ul> | |
</div> | |
<!-- privacy policy button --> | |
<a href="http://www.iubenda.com/privacy-policy/324506" class="iubenda-white iubenda-embed" title="Privacy Policy">Privacy Policy</a><script type="text/javascript">(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src = "http://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);</script> | |
</div> <!--/sidebar --> | |
<!--HERE GO SEARCH RESULTS--> | |
<div class="span9" ng-controller="MepListController"> | |
</div><!--/span--> | |
</div><!--/row--> | |
<hr> | |
<footer> | |
<p>© Spaghetti Open Data </p> | |
</footer> | |
</div><!--/.fluid-container--> | |
<!-- Le javascript | |
================================================== --> | |
<!-- Placed at the end of the document so the pages load faster --> | |
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> | |
<!--<script src="<%= config.base_path %>bootstrap/js/bootstrap.min.js"></script>--> | |
<script src="<%= config.base_path %>angular/angular.min.js"></script> | |
<script src="<%= config.base_path %>angular/angular-resource.min.js"></script> | |
<script src="<%= config.base_path %>javascripts/application.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment