Skip to content

Commit

Permalink
return button on idea create, edit and detail pages, and a few css fi…
Browse files Browse the repository at this point in the history
…xes to idea detail page
  • Loading branch information
rwfalcao committed Apr 6, 2018
1 parent 6b96a39 commit 2152a50
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 45 deletions.
118 changes: 115 additions & 3 deletions ideax/static/css/idea.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ flex-flow: column;
font-size: 1em;
font-weight: bold;
z-index: 1;
max-width: 85%;
}

.idea-header h1,
Expand Down Expand Up @@ -415,7 +416,9 @@ input.menu-input{
border-right: 1px solid #E1E1E1;
z-index: 5;
box-shadow: 1px 2px 3px rgba(0,0,0,0.2);
margin-right: 35px
position: absolute;
top: 35px;
right: 20px;

}

Expand Down Expand Up @@ -770,6 +773,8 @@ input#id_title {
border-radius: 2px;
//box-shadow: 0 1px 2px #c9cccd;
//border: 1px solid #E1E1E1;
display: flex;
flex-direction: column;
}

.idea-desc p{
Expand Down Expand Up @@ -835,7 +840,7 @@ input#id_title {

#idea-tab{
display: flex;
justify-content: space-between;
justify-content: flex-start;
}

.tab-content{
Expand All @@ -861,6 +866,25 @@ input#id_title {
margin: 25px 0;
}

#comment-message{
margin: 15px 0 0px 0
}

#commentForm{
margin-bottom: 0;
}

#commentContent{
resize: none;
}
.nav-link.active{
font-weight: bold;
}

.form-group.comment-group{
margin-top: 5px;
}

.media-left {
margin-left: 25px;
}
Expand All @@ -882,6 +906,66 @@ input#id_title {
font-size: 0.7em;
}



.action-group{
display: flex;
flex-direction: column;
align-items: center;
margin-top: 50px;

}

.action-group a{
display: block;
width: 50%;
padding: 8px 0px;
text-align: center;
border-radius: 6px;
font-size: 1em;
font-weight: bold;
margin: 10px 0;

}


.action-group .edit{
color: #1f5093;
//color: #fefefe;
border: solid 3px #1f5093;
}

.action-group .discard{
color: #e52d2a;
//color: #fefefe;
border: solid 3px #e52d2a;
}

.action-group a:hover{
text-decoration: none;
}

.idea-page-action .action-icon{
font-size: 1.5em;
margin-right: 5px
}

.action-group .edit:hover{
background: #1f5093;
color: #fefefe;
transition: all 0.3s;
border: 3px solid #1f5093;

}

.action-group .discard:hover{
background: #e52d2a;
color: #fefefe;
transition: all 0.3s;
border: 3px solid #e52d2a;

}

/* gereic idea form */
.idea-form{
width: 70%;
Expand All @@ -903,6 +987,8 @@ input#id_title {
height: 130px;
}

textarea { resize: none; }

div.idea-form-header {
background: #6E6E6E;
color: #fff;
Expand Down Expand Up @@ -931,14 +1017,39 @@ div.idea-form-body{
flex-direction: column;
}

.idea-form-body .button-group{
align-self: flex-end;
}

.idea-form-body .button-group a,
.idea-desc .button-group a{
width: 100px;
background-color: #6E6E6E;
border: 1px solid #ccc;
margin-top: 25px;
color: #fefefe;
}

.idea-desc .button-group{
align-self: center;
}




div.idea-form-body button{
width: 100px;
align-self: flex-end;

background-color: #6E6E6E;
border: 1px solid #ccc;
margin-top: 25px;
}

div.idea-form-body button:hover,
div.idea-form-body a:hover{
background: #333 !important;
}

div.idea-form-body .form-group select{
width: 40%;
}
Expand Down Expand Up @@ -1193,6 +1304,7 @@ padding: 8% 15% 0 15%;
.idea-desc{
width: 100%;
}

.idea-interaction{
width: 100%;
}
Expand Down
25 changes: 23 additions & 2 deletions ideax/templates/ideax/idea_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ <h3>{% trans 'Oportunity' %}</h3>
<p>{{ idea.solution|linebreaksbr }}</p>
<h3>{% trans 'Target' %}</h3>
<p>{{ idea.target|linebreaksbr }}</p>
<div class="button-group">
<a class="back-redirect btn" href="/">{% trans 'Return' %}</a>
</div>
</div>
<div class="separator"></div>

Expand All @@ -42,12 +45,17 @@ <h3>{% trans 'Target' %}</h3>
<li class="nav-item">
<a class="nav-link active" id="comments-area-tab" data-toggle="tab" href="#comments-area" role="tab" aria-controls="comments-area" aria-selected="true">Comentários</a>
</li>
<li class="nav-item">
<!-- <li class="nav-item">
<a class="nav-link" id="evaluation-tab" data-toggle="tab" href="#evaluation" role="tab" aria-controls="evaluation" aria-selected="false">Avaliação</a>
</li>
<li class="nav-item">
<a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Histórico</a>
</li>
</li> -->
<!-- {% if request.user.userprofile == idea.author or request.user.userprofile.manager %}
<li class="nav-item">
<a class="nav-link" id="actions-tab" data-toggle="tab" href="#actions" role="tab" aria-controls="actions" aria-selected="false">Ações</a>
</li>
{% endif %} -->
</ul>
<div class="tab-content" id="myTabContent">
<div id="comments-area" class="tab-pane fade show active comments" role="tabpanel" aria-labelledby="comment-group-tab">
Expand Down Expand Up @@ -77,6 +85,19 @@ <h3>{% trans 'Target' %}</h3>
</div>
<div class="tab-pane fade" id="evaluation" role="tabpanel" aria-labelledby="evaluation-tab">Avaliação</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">Contact</div>
<!-- {% if request.user.userprofile == idea.author or request.user.userprofile.manager %}
<div class="tab-pane fade" id="actions" role="tabpanel" aria-labelledby="actinos-tab">
<div class="action-group">
<a href="" class="idea-page-action edit">
<span class="action-icon"><i class="far fa-edit"></i></span> Editar ideia
</a>
<a href="" class="idea-page-action discard">
<span class="action-icon"><i class="far fa-trash-alt"></i></span> Descartar ideia
</a>
</div>
</div>
{% endif %} -->
</div>
</div>

Expand Down
5 changes: 4 additions & 1 deletion ideax/templates/ideax/idea_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ <h4 class="modal-title">{% trans 'Update_Idea' %}</h4>
</div>
<div class="idea-form-body">
{% include 'ideax/includes/partial_idea_form.html' %}
<button type="submit" class="btn btn-primary">{% trans 'Update' %}</button>
<div class="button-group">
<a class="back-redirect btn" href="/">{% trans 'Return' %}</a>
<button type="submit" class="btn btn-primary">{% trans 'Update' %}</button>
</div>
</div>
</form>
</div>
Expand Down
5 changes: 4 additions & 1 deletion ideax/templates/ideax/idea_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ <h4>{% trans 'Create Idea' %}</h4>
</div>
<div class="idea-form-body">
{% include 'ideax/includes/partial_idea_form.html' %}
<button type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
<div class="button-group">
<a class="back-redirect btn" href="/">{% trans 'Return' %}</a>
<button type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
</div>
</div>
</form>
</div>
Expand Down
Loading

0 comments on commit 2152a50

Please sign in to comment.