Browse Source

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

pull/248/head
Pēteris Caune 6 years ago
parent
commit
6c53719002
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
3 changed files with 25 additions and 14 deletions
  1. +0
    -3
      hc/front/views.py
  2. +16
    -0
      static/css/projects.css
  3. +9
    -11
      templates/front/projects.html

+ 0
- 3
hc/front/views.py 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


+ 16
- 0
static/css/projects.css 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;
}

+ 9
- 11
templates/front/projects.html 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>


Loading…
Cancel
Save