Clicking on project's name in page header always goes to "My Projects" overview.

This commit is contained in:
Pēteris Caune 2019-05-02 15:36:18 +03:00
parent 6327b951d5
commit 6c53719002
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
3 changed files with 25 additions and 14 deletions

View File

@ -200,9 +200,6 @@ def index(request):
if request.user.is_authenticated:
projects = list(request.profile.projects())
if len(projects) == 1:
return redirect("hc-checks", projects[0].code)
ctx = {
"page": "projects",
"projects": projects

View File

@ -14,6 +14,7 @@
border-color: #ddd;
padding: 24px 24px 24px 64px;
position: relative;
min-height: 120px;
}
#project-selector .project h4 {
@ -28,4 +29,19 @@
#project-selector .project .status {
position: absolute;
left: 24px;
}
#project-selector #add-project .project {
border: 1px dashed #ddd;
padding: 0;
text-align: center;
font-size: 18px;
font-weight: bold;
color: #999;
line-height: 120px;
}
#project-selector #add-project:hover .project {
border-color: #0091EA;
color: #333;
}

View File

@ -9,13 +9,6 @@
<div class="col-sm-12">
<h1 class="settings-title">
My Projects
<div class="pull-right">
<button
class="btn btn-primary"
data-toggle="modal"
data-target="#add-project-modal">Create New Project</button>
</div>
</h1>
<div id="project-selector" class="row">
@ -43,11 +36,16 @@
</div>
</div>
</a>
{% empty %}
<div class="col-sm-12">
<p>You do not have any projects.</p>
</div>
{% endfor %}
<a id="add-project" href="#" data-toggle="modal" data-target="#add-project-modal">
<div class="col-sm-6 col-md-4">
<div class="panel project {% if project == request.profile.current_project %}selected{% endif %}">
Create New Project&hellip;
</div>
</div>
</a>
</div>
</div>
</div>