Skip to content

Commit 22c5c4d

Browse files
author
Jean-François Pineau
committed
modification de la forme des tickets
1 parent e049bda commit 22c5c4d

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

app/views/my_card/index.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@
7373
</form>
7474

7575
<div class="ticket ticket-modele">
76-
<a href="#" class="id"></a>
77-
<span class="subject"></span>
7876
<div class="line">
7977
Histoire : <a href="#" class="parent"></a>
8078
</div>
79+
<a href="#" class="id"></a>
80+
<span class="subject"></span>
8181
<div class="line custom-field anomalie">
8282
Type anomalie: <span></span>
8383
</div>
84-
<div class="line custom-field start">
84+
<div class="block custom-field start">
8585
Condition de départ: <span></span>
8686
</div>
87-
<div class="line custom-field finish">
87+
<div class="block custom-field finish">
8888
Condition d'acceptation: <span></span>
8989
</div>
9090
<div class="line">

assets/javascripts/card.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@
161161

162162
jQuery('.id',ticketCard).html(issue.id).attr('href',relativeUrl+'/issues/'+issue.id);
163163
//jQuery('.project',ticketCard).html(issue.project.name).attr('href',relativeUrl+'/projects/'+issue.project.name+'/issues');
164-
jQuery('.parent',ticketCard).html(issue.parent).attr('href',relativeUrl+'/issues/'+issue.parent.id);
164+
if (issue.parent) {
165+
jQuery('.parent',ticketCard).html(issue.parent).attr('href',relativeUrl+'/issues/'+issue.parent.id);
166+
} else {
167+
jQuery('.parent').hide();
168+
}
165169
jQuery('.subject',ticketCard).html(issue.subject);
166170

167171
if(issue.story_points){
@@ -178,16 +182,16 @@
178182
jQuery('.anomalie').show();
179183
}
180184
if(issue.custom_fields[i].name=="Conditions de d\u00e9part"){
185+
jQuery('.start').show();
181186
if(issue.custom_fields[i].value){
182187
jQuery('.start span',ticketCard).html(issue.custom_fields[i].value);
183188
}
184-
jQuery('.start').show();
185189
}
186190
if(issue.custom_fields[i].name=="Conditions d'acceptation"){
191+
jQuery('.finish').show();
187192
if(issue.custom_fields[i].value){
188193
jQuery('.finish span',ticketCard).html(issue.custom_fields[i].value);
189194
}
190-
jQuery('.finish').show();
191195
}
192196
}
193197
}

assets/stylesheets/card.css

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,29 @@
5151

5252
.ticket .line{
5353
display:block;
54-
font-weight:bold;
5554
margin-top:5px;
5655
}
5756

5857
.ticket .line span{
5958
font-weight:normal;
6059
}
6160

62-
.ticket .author{
63-
}
61+
.ticket .block{
62+
display:block;
6463

65-
.ticket .category{
64+
margin:5px;
6665
}
6766

68-
.ticket .createdOn{
69-
67+
.ticket .block span{
68+
display:block;
69+
border: solid 1px black;
70+
width: 100%;
71+
margin:5px;
7072
}
7173

7274

75+
76+
7377
#cbp_images_form{ /* Hide Plugin Clipboard image paste*/
7478
display:none;
7579
}

init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
url 'https://github.com/w3blogfr/redmine_card'
1010
author_url 'http://w3blog.fr'
1111

12-
menu :top_menu, :card, { :controller => 'my_card', :action => 'my_index' }, :caption => 'My Card Board', :before => :projects, :if => Proc.new { User.current.logged? }
12+
menu :top_menu, :card, { :controller => 'my_card', :action => 'my_index' }, :caption => 'Impression de tickets', :before => :projects, :if => Proc.new { User.current.logged? }
1313
end

0 commit comments

Comments
 (0)