Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/CareSet/Zermelo into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kchapple committed Mar 29, 2021
2 parents 551557b + e2f8407 commit 38b4a05
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 32 deletions.
69 changes: 37 additions & 32 deletions views/zermelo/card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,17 @@
<div style='display: none' id='json_error_message' class="alert alert-danger" role="alert"></div>
<div style='display: none' id='json_info_message' class="alert alert-info" role="alert"></div>

@if ($report->is_fluid())
<div class='container-fluid'>
@else
<div class='container'>
@endif
@if ($report->is_fluid())
<div class='container-fluid' id='div_for_cards'>
@else
<div class='container' id='div_for_cards'>
@endif

<div id='div_for_cards'>





</div>



</div>
</div> <!-- end of div_for_cards -->


<div id="bottom_locator" style="
Expand Down Expand Up @@ -265,22 +259,38 @@ function doh_ajax_failed(jqxhr, textStatus, error){
//well now a change has occured... we need a newline for sure and possibly a new label..
//real_card_new_row = `<div class="w-100"></div>`;
if(block_count % 2 == 0){
is_block_even = true;
block_test_message = ''; //for testing
extra_block_row_class = ' alternate_row ';
current_row_style = ' ';
}else{
is_block_even = false;
block_test_message = ''; //for testing
extra_block_row_class = '';
current_row_style = '';
}
real_card_new_row = `</div> <!-- end row --> <div class="row"> `;
if(isset(this_card.card_layout_block_label)){ //we have a label... so we will use it to seperate the card blocks
//is there a link or not?
if(isset(this_card.card_layout_block_url)){ //then we also have a url for the label
group_label_open_a = `<a target='_blank' href='${this_card.card_layout_block_url}'>`;
group_label_close_a = `</a>`;
}else{ //we have the label but no url here...
group_label_open_a = '';
group_label_close_a = '';
}
//we have a label, with or without a link..
real_card_group_label = `
if(isset(this_card.card_layout_block_label)){ //we have a label... so we will use it to seperate the card blocks
//is there a link or not?
if(isset(this_card.card_layout_block_url)){ //then we also have a url for the label
group_label_open_a = `<a target='_blank' href='${this_card.card_layout_block_url}'>`;
group_label_close_a = `</a>`;
}else{ //we have the label but no url here...
group_label_open_a = '';
group_label_close_a = '';
}
//we have a label, with or without a link..
real_card_group_label = `
</div> <!-- end the row --> <div class="zermelo-card-group-label">
<h3> ${group_label_open_a} ${this_card.card_layout_block_label} ${group_label_close_a} </h3>
<h3> ${group_label_open_a} ${this_card.card_layout_block_label} ${group_label_close_a} ${block_test_message}</h3>
</div> <!-- end the big column -->
<div class='row'>
<div class='row ${extra_block_row_class}' style=' ${current_row_style} '>
`;
}else{
//there was no label... so we just need to have a newline between the rows...
Expand All @@ -292,13 +302,8 @@ function doh_ajax_failed(jqxhr, textStatus, error){
//reset the last block id to this new one
last_block_id = this_card.card_layout_block_id;
if( block_count % 2 == 0){
//this is an 'even' row and needs to be colored differently..
block_class = ' text-white bg-secondary ';
}else{
//change it back!!
block_class = ' bg-light ';
}
block_class = ' bg-light ';
}
}else{ //then this is the very first card.. lets setup our variables...
Expand Down
17 changes: 17 additions & 0 deletions views/zermelo/layouts/card_layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,27 @@
height: min-content;
vertical-align: middle;
}
.alternate_row {
background-color: whitesmoke;
border-radius: 10px;
padding-top: 5px;
}
@media print {
.alternate_row {
background-color: white;
}
}
</style>
</head>
<body>

@include('Zermelo::menu')

@include('Zermelo::card')

Expand Down
17 changes: 17 additions & 0 deletions views/zermelo/menu.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/">Report Brand</a>
<div class="collapse navbar-collapse justify-content-end" id="navbarNavDropdown">
<ul class="navbar-nav">

<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Report Menu Section
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="/">Report Menu Item</a>
</div>
</li>

</ul>
</div>
</nav>

0 comments on commit 38b4a05

Please sign in to comment.