-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#WIP Shift and room admin view #42
Open
katafira
wants to merge
20
commits into
propedeutica:master
Choose a base branch
from
alexvkcr:shift_and_room_admin_view
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5947863
manual rebase
katafira cd89dce
manual rebase 2
katafira 04aae79
manual rebase
katafira b11641e
manual rebase 5
katafira 42e494a
fixed rubocop errors
katafira b13bbfd
manual rebase 6
katafira ae44cd4
manual rebase 7
katafira 2642586
manual rebase 8
katafira bd2c04c
small fixes on application.js
katafira 6364706
small changes in config files
katafira 6b3c2e2
fixed routes issue
katafira fb93a76
manual rebase 9
katafira 3e43740
moved some buttons
katafira e0a0a68
manual rebase 2
katafira 53c7211
removed will_paginate gem; fixed datatables accordingly
katafira 3fb621b
minor changes
katafira abddfd3
fixed spec error generated in users_controller.rb
katafira 742dd24
fixed minor rubocop offense
katafira 2f0683b
changed admin shift views as needed
katafira a934193
changed normal user shift view as requested
katafira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ def show | |
end | ||
|
||
def index | ||
@users = User.paginate(page: params[:page]) | ||
@users = User.all | ||
end | ||
|
||
def destroy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,50 @@ | ||
<div class="panel panel-default"> | ||
|
||
|
||
<div style="float:left; width: 50%;"> | ||
<div class="panel-heading"> | ||
<h3 id= "blocker_panel_title" class="panel-title"><%="Bloqueo de cambios"%></h3> | ||
</div> | ||
<div class="panel-body"> | ||
<div class="container-fluid"> | ||
<p> | ||
<ul class="list-group"> | ||
<li> Ésta acción permite al administrador bloquear cambios que puedan hacer los usuarios. | ||
<ol> | ||
<li> No se podrán añadir usuarios nuevos. </li> | ||
<li> No se podrán agregar hijos. </li> | ||
<li> No podrán cambiar o reasignar aulas/turnos a no ser que seas administrador. </li> | ||
<li> Cada usuario <b>SÍ</b> podrá borrar su cuenta. </li> | ||
</ol> | ||
</li> | ||
<div> | ||
|
||
<input class="bootstrap-switch" id="bootstrap-switch-state" type="checkbox" checked> | ||
<script> | ||
jQuery(".bootstrap-switch").bootstrapSwitch(); | ||
</script> | ||
</div> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div style="float:left; width: 50%;"> | ||
<div class="panel-heading"> | ||
<h3 id= "blocker_panel_title" class="panel-title"><%="Borrado de la base de datos"%></h3> | ||
<h3 id= "blocker_panel_title" class="panel-title"><%="Bloqueo de cambios"%></h3> | ||
</div> | ||
<div class="panel-body"> | ||
<div class="container-fluid"> | ||
<p> | ||
<ul class="list-group"> | ||
<li> Ésta acción permite al administrador eliminar la base de datos. </li> | ||
|
||
<button class="btn btn-danger btn-lg" type="button" onclick="myFunction()">Borrar BBDD</button> | ||
<li> Ésta acción permite al administrador bloquear cambios que puedan hacer los usuarios. | ||
<ol> | ||
<li> No se podrán añadir usuarios nuevos. </li> | ||
<li> No se podrán agregar hijos. </li> | ||
<li> No podrán cambiar o reasignar aulas/turnos a no ser que seas administrador. </li> | ||
<li> Cada usuario <b>SÍ</b> podrá borrar su cuenta. </li> | ||
</ol> | ||
</li> | ||
<div> | ||
|
||
<input class="bootstrap-switch" id="bootstrap-switch-state" type="checkbox" checked> | ||
<script> | ||
function myFunction() { | ||
alert("I am an alert box!"); | ||
} | ||
jQuery(".bootstrap-switch").bootstrapSwitch(); | ||
</script> | ||
</p> | ||
</div> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div style="float:left; width: 50%;"> | ||
<div class="panel-heading"> | ||
<h3 id= "blocker_panel_title" class="panel-title"><%="Borrado de la base de datos"%></h3> | ||
</div> | ||
<div class="panel-body"> | ||
<div class="container-fluid"> | ||
<p> | ||
<ul class="list-group"> | ||
<li> Ésta acción permite al administrador eliminar la base de datos. </li> | ||
|
||
<!--<button class="btn btn-danger btn-lg" type="button" onclick="myFunction()">Borrar BBDD</button> | ||
<script> | ||
function myFunction() { | ||
alert("I am an alert box!"); | ||
} | ||
</script> --> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ | |
<%= debug(params) if Rails.env.development? %> | ||
</div> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
<div> | ||
<div class="list-group-item"> | ||
<div class="list-view-pf-actions"> | ||
<tr> | ||
<td> | ||
<div class="list-view-pf-body"> | ||
<%= offspring.first_name %> | ||
</div> | ||
</td> | ||
<td> | ||
<div class="list-view-pf-body"> | ||
<%= offspring.last_name %> | ||
</div> | ||
</td> | ||
<td> | ||
<div class="list-view-pf-body"> | ||
<%= I18n.t offspring.grade %> | ||
</div> | ||
</td> | ||
<td> | ||
<div class="list-view-pf-body"> | ||
<%= link_to full_name_for(offspring.user),offspring.user %> | ||
</div> | ||
</td> | ||
<td> | ||
<div class="list-view-pf-actions"> | ||
<% if offspring.shift.nil? %> | ||
<%= link_to "Asignar horario", new_assignment_path(offspring), class: "btn btn-warning"%> | ||
<% else %> | ||
<%= button_to "#{week_day_convert(offspring.shift.day_of_week)}: #{offspring.shift.start_time}", assignment_path(offspring), method: :delete, data: { confirm: 'Esto borrará la asignación y comenzará una nueva, ¿Está seguro?'}, class: "btn btn-success" %> | ||
<% end %> | ||
<%= button_to "Borrar niño", { action: "destroy", controller: 'offsprings', id: offspring.id} , method: :delete, data: { confirm: 'Esta acción no puede cancelarse, ¿Está seguro?'} , class:"btn btn-primary"%> | ||
</div> | ||
|
||
<div class="list-view-pf-body"> | ||
<%= offspring.first_name %> | ||
</div> | ||
|
||
<div class="list-view-pf-body"> | ||
<%= offspring.last_name %> | ||
</div> | ||
|
||
<div class="list-view-pf-body"> | ||
<%= I18n.t offspring.grade %> | ||
</div> | ||
<div class="list-view-pf-body"> | ||
<%= link_to full_name_for(offspring.user),offspring.user %> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</td> | ||
</tr> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what you should comment or delete