Add 'Not started' btn to other views

This commit is contained in:
Ivan Kljun 2023-08-22 14:30:49 +02:00
parent 8ba9b2df6a
commit 28adb4956d
8 changed files with 32 additions and 14 deletions

View file

@ -43,7 +43,8 @@ var ExperimnetTable = {
return `<a href="${data.url}">${data.count}</a>`;
},
status: function(data) {
return `<div class="my-module-status" style="background-color: ${data.color}">${data.name}</div>`;
return `<div class="my-module-status ${data.name === 'Not started' ? 'btn-not-started' : ''}"
style="background-color: ${data.color}">${data.name}</div>`;
},
assigned: function(data) {
return data.html;

View file

@ -211,6 +211,10 @@
color: $color-white;
font-weight: bold;
padding: .25em .5em;
&.btn-not-started {
@include not-started;
}
}
}

View file

@ -35,6 +35,10 @@
padding: 2px 8px;
text-overflow: ellipsis;
white-space: nowrap;
&.btn-not-started {
@include not-started;
}
}
}

View file

@ -359,6 +359,10 @@
padding: 2px 8px;
text-overflow: ellipsis;
white-space: nowrap;
&.btn-not-started {
@include not-started;
}
}
.table-row-placeholder-divider {

View file

@ -77,6 +77,10 @@
width: .5em;
}
@mixin not-started {
border: 1px solid var(--sn-sleepy-grey);
color: var(--sn-black);
}
// Material design mixins

View file

@ -13,8 +13,7 @@
width: 100%;
&.btn-not-started {
border: 1px solid var(--sn-sleepy-grey);
color: var(--sn-black);
@include not-started;
}
.caret {
@ -74,8 +73,7 @@
}
.btn-not-started {
border: 1px solid var(--sn-sleepy-grey);
color: var(--sn-black);
@include not-started;
}
.error-message {
@ -139,8 +137,7 @@
white-space: nowrap;
&.btn-not-started {
border: 1px solid var(--sn-sleepy-grey);
color: var(--sn-black);
@include not-started;
}
}

View file

@ -65,12 +65,13 @@
</div>
</div>
<div class="status-label" style="--state-color: <%= my_module.my_module_status.color %>">
<% if my_module.status_changing %>
<i class="fas fa-spinner fa-spin"></i>
<span><%= t('experiments.canvas.full_zoom.status_transitioning_label') %></span>
<% end %>
<%= my_module.my_module_status.name %>
<div class="status-label <%= 'btn-not-started' if my_module.my_module_status.name == 'Not started' %>"
style="--state-color: <%= my_module.my_module_status.color %>">
<% if my_module.status_changing %>
<i class="fas fa-spinner fa-spin"></i>
<span><%= t('experiments.canvas.full_zoom.status_transitioning_label') %></span>
<% end %>
<%= my_module.my_module_status.name %>
</div>
</div>

View file

@ -16,6 +16,9 @@
<% end %>
</div>
<div class="task-status-container row-border">
<span class="task-status" style="background:<%= task.status_color %>"><%= task.status_name %></span>
<span class="task-status <%= 'btn-not-started' if task.status_name == 'Not started' %>"
style="background:<%= task.status_color %>">
<%= task.status_name %>
</span>
</div>
</a>