Commit 43cd4bc9 authored by Rafal's avatar Rafal

reapair code

parent c963c53b
.borderless tbody tr td, .borderless tbody tr th, .borderless thead tr th {
border: none;
}
\ No newline at end of file
...@@ -8,7 +8,7 @@ var Map = (function(){ ...@@ -8,7 +8,7 @@ var Map = (function(){
Map.prototype.init = function(){ Map.prototype.init = function(){
var self = this; var self = this;
this.myLatLng = {lat: 50.049765, lng: 19.946762}; this.myLatLng = {lat: 50.049765, lng: 19.946762};
this.map = new google.maps.Map(document.getElementById('map'), { this.map = new google.maps.Map(document.getElementById('gmaps'), {
zoom: 4, zoom: 4,
center: self.myLatLng center: self.myLatLng
}); });
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'css/footer.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'css/footer.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'css/the-big-picture.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'css/the-big-picture.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'css/beacons.css' %}" />
<title>Free Beacons</title> <title>Free Beacons</title>
</head> </head>
......
{{ project_data }}
{{ beacon }}
<div class="box">
<table class="table borderless">
<tbody>
<tr>
<td class="col-md-2">{{ beacon.name }}</td>
<td>Doe
</td>
</tr>
</tbody>
</table>
</div>
\ No newline at end of file
<div class="container">
<table class="table borderless">
<thead>
<tr>
<th class="col-md-2">Beacon</th>
<th>Linki</th>
</tr>
</thead>
</table>
{% for beacon in project_data.beacons %}
{% include 'user_panel/content/beacon_detail.html' %}
{% endfor %}
</div>
\ No newline at end of file
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
<div class="tab-content"> <div class="tab-content">
<div id="beacons" class="tab-pane fade in active"> <div id="beacons" class="tab-pane fade in active">
<h3>HOME</h3>
<p>Some content.</p> {% include 'user_panel/content/beacons.html' %}
</div> </div>
<div id="map" class="tab-pane fade"> <div id="map" class="tab-pane fade">
{% include 'user_panel/content/maps.html' %} {% include 'user_panel/content/maps.html' %}
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'css/footer.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'css/footer.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'css/font-awesome.min.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'css/font-awesome.min.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'css/beacons.css' %}" />
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
...@@ -30,7 +31,6 @@ ...@@ -30,7 +31,6 @@
</div> </div>
{% include 'user_panel/default/footer.html' %} {% include 'user_panel/default/footer.html' %}
<script src="{% static 'js/hobby_detail.js' %}"></script>
<script src="{% static 'js/map.js' %}"></script> <script src="{% static 'js/map.js' %}"></script>
<script src="{% static 'js/project_detail.js' %}"></script> <script src="{% static 'js/project_detail.js' %}"></script>
<script src="{% static 'js/bootstrap.js' %}"></script> <script src="{% static 'js/bootstrap.js' %}"></script>
......
...@@ -125,4 +125,12 @@ def dashboard(request): ...@@ -125,4 +125,12 @@ def dashboard(request):
def project(request, project_id): def project(request, project_id):
context = RequestContext(request) context = RequestContext(request)
return render_to_response('user_panel/content/project.html', {}, context) data = {}
user_project = UserProject.objects.get(id=project_id)
user_project_serializer = UserProjectSerializer(user_project, context={'request': request})
beacons_serializer = BeaconSerializer(user_project.beacons, many=True,context={'request': request})
data['project_data'] = user_project_serializer.data
data['project_data']['beacons'] = beacons_serializer.data
return render_to_response('user_panel/content/project.html', data, context)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment