Skip to content

Commit 36efcb3

Browse files
authored
Enhancement/views (#72)
* Logs view style enhanced * Patient answer survey view style enhanced * Medical Variables style enhanced * Encuestas views style enhanced * Doctors patients view style enhanced * Gemfile.lock
1 parent 310f6c7 commit 36efcb3

12 files changed

+419
-137
lines changed

Gemfile.lock

+225
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actioncable (5.2.3)
5+
actionpack (= 5.2.3)
6+
nio4r (~> 2.0)
7+
websocket-driver (>= 0.6.1)
8+
actionmailer (5.2.3)
9+
actionpack (= 5.2.3)
10+
actionview (= 5.2.3)
11+
activejob (= 5.2.3)
12+
mail (~> 2.5, >= 2.5.4)
13+
rails-dom-testing (~> 2.0)
14+
actionpack (5.2.3)
15+
actionview (= 5.2.3)
16+
activesupport (= 5.2.3)
17+
rack (~> 2.0)
18+
rack-test (>= 0.6.3)
19+
rails-dom-testing (~> 2.0)
20+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
21+
actionview (5.2.3)
22+
activesupport (= 5.2.3)
23+
builder (~> 3.1)
24+
erubi (~> 1.4)
25+
rails-dom-testing (~> 2.0)
26+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
27+
activejob (5.2.3)
28+
activesupport (= 5.2.3)
29+
globalid (>= 0.3.6)
30+
activemodel (5.2.3)
31+
activesupport (= 5.2.3)
32+
activerecord (5.2.3)
33+
activemodel (= 5.2.3)
34+
activesupport (= 5.2.3)
35+
arel (>= 9.0)
36+
activestorage (5.2.3)
37+
actionpack (= 5.2.3)
38+
activerecord (= 5.2.3)
39+
marcel (~> 0.3.1)
40+
activesupport (5.2.3)
41+
concurrent-ruby (~> 1.0, >= 1.0.2)
42+
i18n (>= 0.7, < 2)
43+
minitest (~> 5.1)
44+
tzinfo (~> 1.1)
45+
addressable (2.7.0)
46+
public_suffix (>= 2.0.2, < 5.0)
47+
archive-zip (0.12.0)
48+
io-like (~> 0.3.0)
49+
arel (9.0.0)
50+
bcrypt (3.1.13)
51+
bindex (0.8.1)
52+
bootsnap (1.4.5)
53+
msgpack (~> 1.0)
54+
builder (3.2.3)
55+
byebug (11.0.1)
56+
capybara (3.29.0)
57+
addressable
58+
mini_mime (>= 0.1.3)
59+
nokogiri (~> 1.8)
60+
rack (>= 1.6.0)
61+
rack-test (>= 0.6.3)
62+
regexp_parser (~> 1.5)
63+
xpath (~> 3.2)
64+
childprocess (2.0.0)
65+
rake (< 13.0)
66+
chromedriver-helper (2.1.1)
67+
archive-zip (~> 0.10)
68+
nokogiri (~> 1.8)
69+
coffee-rails (4.2.2)
70+
coffee-script (>= 2.2.0)
71+
railties (>= 4.0.0)
72+
coffee-script (2.4.1)
73+
coffee-script-source
74+
execjs
75+
coffee-script-source (1.12.2)
76+
concurrent-ruby (1.1.5)
77+
crass (1.0.4)
78+
devise (4.7.1)
79+
bcrypt (~> 3.0)
80+
orm_adapter (~> 0.1)
81+
railties (>= 4.1.0)
82+
responders
83+
warden (~> 1.2.3)
84+
erubi (1.8.0)
85+
execjs (2.7.0)
86+
ffi (1.11.1)
87+
globalid (0.4.2)
88+
activesupport (>= 4.2.0)
89+
i18n (1.6.0)
90+
concurrent-ruby (~> 1.0)
91+
io-like (0.3.0)
92+
jbuilder (2.9.1)
93+
activesupport (>= 4.2.0)
94+
libv8 (7.3.492.27.1-x86_64-linux)
95+
listen (3.1.5)
96+
rb-fsevent (~> 0.9, >= 0.9.4)
97+
rb-inotify (~> 0.9, >= 0.9.7)
98+
ruby_dep (~> 1.2)
99+
loofah (2.2.3)
100+
crass (~> 1.0.2)
101+
nokogiri (>= 1.5.9)
102+
mail (2.7.1)
103+
mini_mime (>= 0.1.1)
104+
marcel (0.3.3)
105+
mimemagic (~> 0.3.2)
106+
method_source (0.9.2)
107+
mimemagic (0.3.3)
108+
mini_mime (1.0.2)
109+
mini_portile2 (2.4.0)
110+
mini_racer (0.2.6)
111+
libv8 (>= 6.9.411)
112+
minitest (5.11.3)
113+
msgpack (1.3.1)
114+
nio4r (2.5.1)
115+
nokogiri (1.10.4)
116+
mini_portile2 (~> 2.4.0)
117+
orm_adapter (0.5.0)
118+
pg (1.1.4)
119+
public_suffix (4.0.1)
120+
puma (3.12.1)
121+
rack (2.0.7)
122+
rack-test (1.1.0)
123+
rack (>= 1.0, < 3)
124+
rails (5.2.3)
125+
actioncable (= 5.2.3)
126+
actionmailer (= 5.2.3)
127+
actionpack (= 5.2.3)
128+
actionview (= 5.2.3)
129+
activejob (= 5.2.3)
130+
activemodel (= 5.2.3)
131+
activerecord (= 5.2.3)
132+
activestorage (= 5.2.3)
133+
activesupport (= 5.2.3)
134+
bundler (>= 1.3.0)
135+
railties (= 5.2.3)
136+
sprockets-rails (>= 2.0.0)
137+
rails-dom-testing (2.0.3)
138+
activesupport (>= 4.2.0)
139+
nokogiri (>= 1.6)
140+
rails-html-sanitizer (1.2.0)
141+
loofah (~> 2.2, >= 2.2.2)
142+
railties (5.2.3)
143+
actionpack (= 5.2.3)
144+
activesupport (= 5.2.3)
145+
method_source
146+
rake (>= 0.8.7)
147+
thor (>= 0.19.0, < 2.0)
148+
rake (12.3.3)
149+
rb-fsevent (0.10.3)
150+
rb-inotify (0.10.0)
151+
ffi (~> 1.0)
152+
regexp_parser (1.6.0)
153+
responders (3.0.0)
154+
actionpack (>= 5.0)
155+
railties (>= 5.0)
156+
ruby_dep (1.5.0)
157+
rubyzip (1.2.4)
158+
sass (3.7.4)
159+
sass-listen (~> 4.0.0)
160+
sass-listen (4.0.0)
161+
rb-fsevent (~> 0.9, >= 0.9.4)
162+
rb-inotify (~> 0.9, >= 0.9.7)
163+
sass-rails (5.1.0)
164+
railties (>= 5.2.0)
165+
sass (~> 3.1)
166+
sprockets (>= 2.8, < 4.0)
167+
sprockets-rails (>= 2.0, < 4.0)
168+
tilt (>= 1.1, < 3)
169+
selenium-webdriver (3.142.4)
170+
childprocess (>= 0.5, < 3.0)
171+
rubyzip (~> 1.2, >= 1.2.2)
172+
sprockets (3.7.2)
173+
concurrent-ruby (~> 1.0)
174+
rack (> 1, < 3)
175+
sprockets-rails (3.2.1)
176+
actionpack (>= 4.0)
177+
activesupport (>= 4.0)
178+
sprockets (>= 3.0.0)
179+
thor (0.20.3)
180+
thread_safe (0.3.6)
181+
tilt (2.0.9)
182+
tzinfo (1.2.5)
183+
thread_safe (~> 0.1)
184+
uglifier (4.1.20)
185+
execjs (>= 0.3.0, < 3)
186+
warden (1.2.8)
187+
rack (>= 2.0.6)
188+
web-console (3.7.0)
189+
actionview (>= 5.0)
190+
activemodel (>= 5.0)
191+
bindex (>= 0.4.0)
192+
railties (>= 5.0)
193+
websocket-driver (0.7.1)
194+
websocket-extensions (>= 0.1.0)
195+
websocket-extensions (0.1.4)
196+
xpath (3.2.0)
197+
nokogiri (~> 1.8)
198+
199+
PLATFORMS
200+
ruby
201+
202+
DEPENDENCIES
203+
bootsnap (>= 1.1.0)
204+
byebug
205+
capybara (>= 2.15)
206+
chromedriver-helper
207+
coffee-rails (~> 4.2)
208+
devise
209+
jbuilder (~> 2.5)
210+
listen (>= 3.0.5, < 3.2)
211+
mini_racer
212+
pg (>= 0.18, < 2.0)
213+
puma (~> 3.11)
214+
rails (~> 5.2.3)
215+
sass-rails (~> 5.0)
216+
selenium-webdriver
217+
tzinfo-data
218+
uglifier (>= 1.3.0)
219+
web-console (>= 3.3.0)
220+
221+
RUBY VERSION
222+
ruby 2.6.4p104
223+
224+
BUNDLED WITH
225+
2.0.2

app/controllers/medical_variables_controller.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ def create
2222
end
2323
end
2424

25-
def show
26-
@medical_variable = MedicalVariable.find(params[:id])
27-
end
28-
2925
def edit
3026
@medical_variable = MedicalVariable.find(params[:id])
3127
end
@@ -37,7 +33,7 @@ def update
3733
else
3834
flash.now[:error] = 'Hubo un error con el registro, verifica los campos del formulario'
3935
end
40-
redirect_to @medical_variable
36+
redirect_to medical_variables_path
4137
end
4238

4339
private

app/views/doctors/index.html.erb

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<div class="doctor-container">
22
<div class="flex-column-container">
33
<h2>Pacientes</h2>
4-
<%= link_to "Añadir Paciente", new_patient_path %>
5-
<h2>Directos:</h2>
4+
<h2>Directos</h2>
65
<div class="flex-container-doctor">
76
<% if @patients.empty? %>
87
<h3 class="d-flex w-100 justify-content-center text-muted">Aún no tiene pacientes</h3>
98
<% else %>
9+
<div class="d-flex w-100 justify-content-center">
10+
<div class="d-flex w-100 justify-content-end mb-2">
11+
<%= link_to "+ Añadir Paciente", new_patient_path, class: 'btn badge-pill btn-outline-primary mr-4' %>
12+
</div>
13+
</div>
1014
<div class="flex-dock">
1115
<table class="table table-striped">
1216
<thead class="bg-info text-light">
@@ -43,7 +47,7 @@
4347
</div>
4448
</div>
4549

46-
<h2>Adicionales:</h2>
50+
<h2>Adicionales</h2>
4751
<div class="flex-container-doctor">
4852
<div>
4953
<% if @viewable_patients.empty? %>
+33-25
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
1-
<div class="custom-container container col-11 scrollable">
2-
<% if @encuestas.any? %>
3-
<div class="row">
4-
<div class="col-6 grid-header">
5-
Nombre de encuesta
6-
</div>
7-
<div class="col-6 grid-header">
8-
Link
1+
<div class="d-flex w-100 justify-content-center">
2+
<div class="d-flex w-75 justify-content-start">
3+
<h2>Contestar Encuestas</h2>
94
</div>
105
</div>
11-
<% @encuestas.each do |encuesta| %>
12-
<div class="row">
13-
<div class="col-6 grid-content">
14-
<%= encuesta.name %>
15-
</div>
16-
<div class="col-6 grid-content">
17-
<%= button_to "Contestar", encuesta.url, class: 'btn btn-primary', form: {target: '_blank'}
18-
%>
6+
<div class="d-flex w-100 justify-content-center">
7+
<div class="d-flex w-75 justify-content-start">
8+
<div class="custom-container container col-11 scrollable">
9+
<% if @encuestas.any? %>
10+
<table class="table table-striped">
11+
<thead class="bg-info text-light">
12+
<tr>
13+
<th scope="col">Nombre de encuesta</th>
14+
<th scope="col">Link</th>
15+
</tr>
16+
</thead>
17+
<tbody>
18+
<% @encuestas.each do |encuesta| %>
19+
<tr>
20+
<td><%= encuesta.name %></td>
21+
<td><%= link_to "Contestar", encuesta.url, class: 'btn btn-primary', target: :_blank %></td>
22+
</tr>
23+
<% end %>
24+
</tbody>
25+
</table>
26+
<% else %>
27+
<div class="row">
28+
<div class="col-6 grid-content">
29+
Actualmente no tienes encuestas asignadas.
30+
</div>
31+
</div>
32+
<% end %>
33+
</div>
1934
</div>
2035
</div>
21-
<% end %>
22-
<% else %>
23-
<div class="row">
24-
<div class="col-6 grid-content">
25-
Actualmente no tienes encuestas asignadas.
26-
</div>
27-
</div>
28-
<% end %>
29-
</div>
36+
37+

app/views/encuestas/_form.html.erb

+22-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
<%= form_for :encuesta,:html=> { class: 'form-style-7' } do |f| %>
2-
<%= render "devise/shared/error_messages", resource: encuesta %>
1+
<div class="flex-container mt-4">
2+
<div class="flex-column-container">
3+
<div class="center-container">
4+
<div class="registration_container">
5+
<h2 class="registration_sign_in w-100 d-inline-block text-center">Encuesta</h2>
6+
<hr>
7+
<%= form_for :encuesta,:html=> { class: 'form-style-7' } do |f| %>
8+
<div class="field">
9+
<h4 class="registration_title">Nombre de la Encuesta</h4>
10+
<%= f.text_field :name, class:"registration_input pl-2", autofocus: true %>
11+
</div>
312

4-
<div class="field">
5-
<%= f.label :name %><br />
6-
<%= f.text_field :name, autofocus: true %>
7-
</div>
8-
9-
<div class="field">
10-
<%= f.label :url %><br />
11-
<%= f.text_field :url, autofocus: true %>
12-
</div>
13+
<div class="field registration_space">
14+
<h4 class="registration_title">URL</h4>
15+
<%= f.text_field :url, class:"registration_input pl-2 h-5", autofocus: false %>
16+
</div>
1317

14-
<div class="actions">
15-
<%= f.submit "Guardar" %>
18+
<div class="actions registration_space registration_button">
19+
<%= f.submit "Registrar", class:"btn btn-primary" %>
20+
</div>
21+
<% end %>
22+
</div>
23+
</div>
1624
</div>
17-
<% end %>
25+
</div>

app/views/encuestas/_minimenu.html.erb

Whitespace-only changes.

app/views/encuestas/_topmenu.html.erb

-3
This file was deleted.

0 commit comments

Comments
 (0)