-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.html
150 lines (147 loc) · 5.44 KB
/
post.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{% extends "portal/base.html" %}
{% load extra_templates %}
{% load static %}
{% load humanize %}
{% block addstyles %}<link rel="stylesheet" href="/static/css/gethired.css">{% endblock%}
{% block title %} Project Marketplace {% endblock %}
{% block header %} Project Marketplace {% endblock %}
{% block content %}
<div class="filteroptions col-md-3">
<div class="filterdiv panel panel-default">
<div class="contain">
<div class="container-fluid">
<div class="row">
<h5><span class='labs'>Related Posts:</span></h5>
{% for post in related_posts %}
<div class="col-md-12 related-post" data-num="{{forloop.counter}}">
<div class="row">
<a class="postLinks" href="{% url 'get_post_project' post_id=post.pk %}">{{post.title}}</a><br>
</div>
<div class="row related-post-location">
{{post.location}}
</div>
</div>
<div class="hover-test" style="display: none;" data-num="{{forloop.counter}}">
<p>Date posted: <span class="data">{{post.date_posted|naturalday|title}}</span></p>
<p>Technologies:</p>
<ul>
{% for t in post.technologies.all %}
<li></span class="data">{{t}}</span>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$(document).scrollTop( $("div.navrow").offset().top );
console.log(document.referrer);
var refer = new URI(document.referrer);
console.log(refer.host());
console.log(refer);
var edit = refer.path().indexOf("edit");
var newind = refer.path().indexOf("new");
if(edit > -1){
$('.btn-go-back').hide();
}
if(newind > -1){
$('.btn-go-back').hide();
}
if(refer.host() != "localhost:8000"){
$('.btn-go-back').hide();
}
});
</script>
<div class="post_bar col-md-9">
<div class="postview col-md-12">
<div class="container-fluid">
<div class="postview-button-row row">
<button onclick="window.history.back()" class="btn pull-left btn-info btn-go-back">Go Back</button>
{% if user.username == post.author.username %}
<form id="delete" method="post" action = "{% url 'delete_post' post_type=post.post_type post_id=post.pk %}">
{% csrf_token %}
<div class="btn-group pull-right" style="padding-top: 5px;">
<button type="button" class="btn btn-info pull-right dropdown-toggle" data-toggle="dropdown">Edit/Delete Post<span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{% url 'edit_post_project' post_id=post.pk %}">Edit Post</a></li>
<li class="divider"></li>
<li><a href="javascript:void()" id="submit_link">Delete Post</a></li>
</ul>
</form>
</div>
{% else %}
<div class="btn-group pull-right" style="padding-top: 5px;">
<button type="button" class="btn btn-info pull-right dropdown-toggle" data-toggle="dropdown">Edit/Delete Post<span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{% url 'edit_post_password_project' post_id=post.pk edit_or_delete='edit'%}">Edit Post</a></li>
<li class="divider"></li>
<li><a href="{% url 'edit_post_password_project' post_id=post.pk edit_or_delete='delete' %}">Delete Post</a></li>
</ul>
</div>
{% endif %}
</div> <!-- Button Row -->
</div>
<div class="container-fluid">
<div class="row">
<div class="title col-md-12">
<div class="row">
<h3 class="title">{{post.title|title}}</h3>
<span class="postview-label label label-danger">{{post.post_type|title}}</span>
<span class="date">Posted: {{post.date_posted|naturalday|title}}</span>
</div>
<div class="row postview-upperinfo">
<div class="container-fluid">
<div class="row">
<span class="lab">Project Manager: <span class="content"><a class="norm" href="">{{post.client}}</a></span></span>
</div>
<div class="row">
<div style="padding-top: 10px"><img alt="location" src="{% static "/static/images/gethired/map_location_test.png" %}"><span class="postview-location"><a href="">{{post.location}}</a></span></div>
</div>
</div>
</div>
</div>
</div><!-- Title Row -->
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row postview-interview-info-row">
<label>Technologies</label>
<p><span class="content">
{% for t in post.technologies.all %}
<a href="/marketplace/filter/?technology={{t}}">{{t}}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</span></p>
<div class=col-md-12>
<div class="col-md-4 col-md-offset-2" style="text-align:center;">
<label>Tentative start date</label>
<p class="date-start">{{post.start_date}}</p>
</div>
<div class="col-md-4" style="text-align:center;">
<label>Tentative end date:</label>
{% if post.end_date %}
<p class="date-end">{{post.end_date}}</p>
{% else %}
<p class="date-end">N/A</p>
{% endif %}
</div>
</div>
<label>Project Description:</label>
<div class="well"><p class="description">{{post.description|safe}}</p></div>
<p><a class="btn default-btn btn-info" href="{% url 'contact_project' post_id=post.pk %}">Click to Contact</a></p>
</div>
</div>
</div>
</div>
<div class="postview-report-rate row">
<div class="content">
<p>Report this post</p>
</div>
</div>
</div>
</div>
</div>
{% endblock %}