Commit 79d0ecb6 authored by ira.maier's avatar ira.maier
Browse files

Layout improvements: new edit sample table, fixed footer

parent 4a821187
......@@ -41,9 +41,10 @@ gem 'dotenv-rails', require: 'dotenv/rails-now'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
# remove it for Turbolinks 5?
gem 'jquery-turbolinks'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
# gem 'turbolinks', '~> 5'
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
......
GIT
remote: https://github.com/MiniProfiler/rack-mini-profiler
revision: 4781bce89b0b92949e75daabdd6ea2d05a8a832d
revision: c7742152bae5f815e5e5da3a1d095889cac3e573
specs:
rack-mini-profiler (2.3.0)
rack (>= 1.2.0)
......@@ -113,7 +113,7 @@ GEM
railties (>= 3.2, < 6.2)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.8.5)
i18n (1.8.7)
concurrent-ruby (~> 1.0)
jbuilder (2.10.1)
activesupport (>= 5.0.0)
......@@ -141,14 +141,15 @@ GEM
method_source (1.0.0)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
mini_portile2 (2.5.0)
minitest (5.14.2)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
nio4r (2.5.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.11.0)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
orm_adapter (0.5.0)
pdf-core (0.9.0)
pg (1.2.3)
......@@ -157,6 +158,7 @@ GEM
ttfunk (~> 1.7)
prawn-table (0.2.2)
prawn (>= 1.3.0, < 3.0.0)
racc (1.5.2)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
......@@ -287,6 +289,7 @@ DEPENDENCIES
sass-rails (~> 5.0)
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
unicorn
......
......@@ -14,6 +14,9 @@
*= require_self
*= require font-awesome
*/
.container-fluid{
padding: 5rem 2rem 2rem 2rem;
}
.sample-submitted {
background-color: #feffea;
......@@ -26,3 +29,5 @@
.sample-measured {
background-color: #e2f7e7;
}
......@@ -18,16 +18,18 @@ p {
line-height: 1.5em;
}
.navbar {
margin-top: 0;
margin-bottom: 0;
border-radius: 0;
//position: fixed;
margin-bottom: 0;
margin-top: 0;
position: fixed;
width: 100%;
}
/* Set height of the grid so .sidenav can be 100% (adjust as needed) */
.row.content {height: 650px}
/* Set gray background color and 100% height */
//todo
.sidenav {
padding-top: 20px;
background-color: #f1f1f1;
......@@ -37,9 +39,9 @@ p {
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: white;
padding: 5px;
background-color: black;
color: grey;
padding: 0.5rem;
position: fixed;
left: 0;
bottom: 0;
......@@ -124,9 +126,10 @@ input, textarea, select, .uneditable-input {
// @include box_sizing;
}
//input {
input {
border-radius: 0.5rem;
// height: auto !important;
//}
}
input[type="checkbox"]{
margin: 0;
......@@ -148,12 +151,29 @@ input[type="checkbox"]{
}
}
form{
input{
margin: 0.5rem 0.5rem 0.5rem 0.5rem;
//form{
// input{
// margin: 0.5rem 0.5rem 0.5rem 0.5rem;
// }
// label{
// margin: 0;
// }
//}
#edit_sample_table{
border-radius: 0.5rem;
input{
margin: 0;
width: auto;
}
td, th{
padding: 0.5rem;
}
label{
margin: 0;
th{
text-align: center;
}
}
......@@ -345,4 +365,14 @@ div.absolute {
#file_list td{
width: 10rem;
}
table{
text-align: center;
tbody{
//border: solid lightgray;
}
td{
border: 1px solid lightgray;
}
}
\ No newline at end of file
......@@ -13,8 +13,10 @@
#show{
display:inline-block;
float: left;
margin: 0rem 0rem 0.5rem 0.5rem;
width:60%;
margin: 0rem 0.5rem 0.5rem 0.5rem;
padding: 0rem 0.5rem 0.5rem 0.5rem;
width:65%;
}
.splitScreen{
......@@ -26,15 +28,22 @@
.table{
margin: 0rem 0rem 0rem 0rem;
padding : 0rem 0rem 0rem 0rem;
overflow-y: scroll;
/*overflow-y: scroll;*/
}
/*.scrollbar{*/
/* margin: 0;*/
/* overflow-y: scroll;*/
/* padding: 0;*/
/* max-width:49%;*/
/* width:30%;*/
/*}*/
#samples_list{
display:inline-block;
float: left;
margin: 0rem 0.5rem 0.5rem 0rem;
margin: 0rem 0.5rem 0rem 0rem;
// err scrolling not working
overflow-y: scroll;
max-width:49%;
width:30%;
}
......
<footer class="container-fluid">
<!--class="container-fluid"-->
<footer>
<small>© 2020 - ela</small>
</footer>
......@@ -18,7 +18,7 @@
</div>
</div>
<%# todo don't hide page content under footer %>
<%#= render 'layouts/footer' %>
<%= render 'layouts/footer' %>
</div>
</body>
</html>
<% provide(:title, "Edit sample") %>
<%if @sample.status=="in preparation"%>
<br>
<div class="div-table">
<div class="div-table-row">
<div class="div-table-col" style="font-weight:bold">ID</div>
<div class="div-table-col" style="font-weight:bold"> Name</div>
<div class="div-table-col" style="font-weight:bold">Formula</div>
<div class="div-table-col" style="font-weight:bold">Status</div>
<div class="div-table-col" style="font-weight:bold">Action</div>
</div>
<div class="div-table-row">
<%= form_for(@sample) do |f| %>
<%= render 'shared/error_messages', object: f.object %>
<div class="div-table-col" style="text-align:left"><%= @sample.id%></div>
<div class="div-table-col" style="padding:0px"> <%= f.text_field :name, class: 'form-control' %></div>
<div class="div-table-col" style="padding:0px"><%= f.text_field :formula, class: 'form-control' %></div>
<div class="div-table-col" style="text-align:left"><%= @sample.status%></div>
<div class="div-table-col" style="padding:7px"> <%= f.submit "save", class: "button-link"%></div>
<%end%>
</div>
</div>
<%# todo %>
<%= form_for(@sample) do |f| %>
<%= render 'shared/error_messages', object: f.object %>
<table id="edit_sample_table">
<tr>
<th>ID</th>
<th>Name</th>
<th>Formula</th>
<th>Status</th>
<th>Action</th>
</tr>
<tr>
<td><%= @sample.id%></td>
<td><%= f.text_field :name%></td>
<td><%= f.text_field :formula%></td>
<td><%= @sample.status%></td>
<td><%= f.submit "save", class: "button-link"%></td>
</tr>
</table>
<% end %>
<% end %>
<div style='margin-top:50px'>
......
......@@ -5,6 +5,8 @@
<div class="splitScreen">
<%end%>
<!--left side-->
<!--<div class="scrollbar">-->
<table id="samples_list" class="table table-hover table-bordered" style="overflow-y: scroll">
<thead>
<tr>
......@@ -90,6 +92,7 @@
<%end%>
</tbody>
</table>
<!--</div>-->
<%if @sample&.persisted? %>
<div class="panel panel-default" id="show">
......
......@@ -15,27 +15,6 @@
$('tbody#resultTable').on('cocoon:before-insert', function() {
console.log('yepyep');
});
// let selectAllCheckbox = document.querySelector('#sample_delete_files');
// let filenameCheckboxes = document.querySelectorAll('[name="sample[delete_file][]"]');
// console.log(selectAllCheckbox);
// console.log(filenameCheckboxes);
// function handleSelectAll(e) {
// if (selectAllCheckbox.checked === true) {
// filenameCheckboxes.forEach(checkbox => {
// checkbox.checked = true;
// })
// } else {
// filenameCheckboxes.forEach(checkbox => {
// checkbox.checked = false;
// })
// }
// }
//
// if(selectAllCheckbox){
// selectAllCheckbox.addEventListener('click', handleSelectAll, false);
// }
})
</script>
......@@ -49,6 +28,8 @@
<p>Created at: <%= @sample.created_at%></p>
<%end%>
<!-- right side-->
<table id="tab_logic" class="table table-bordered table-hover table-width" >
<thead>
<tr>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment