diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss
index 945ff9a..82d865a 100644
--- a/app/assets/stylesheets/application.css.scss
+++ b/app/assets/stylesheets/application.css.scss
@@ -15,7 +15,7 @@ html body {
font-size: 2.75em;
font-weight: 300;
line-height: 1.5em;
- border-bottom: 1px solid #DDD;
+ border-bottom: 1px solid #EEE;
}
h3 {
@@ -32,7 +32,7 @@ body .page-header {
font-size: 2.25em;
font-weight: 300;
line-height: 1.75em;
- border-bottom: 1px solid #DDD;
+ border-bottom: 1px solid #EEE;
}
}
@@ -382,19 +382,26 @@ body .field_with_errors {
h1 {
padding-top: 15px;
- border-top: 1px solid #DDD;
text-shadow: 0 1px 0 white;
border-bottom: none;
}
}
/* Breadcrumbs */
+body .context-breadcrumb {
+ background: #EAEAEA;
+ border-bottom: 1px solid #DDD;
+}
body .breadcrumb {
border-width: 0;
background: none;
box-shadow: none;
margin-bottom: 0;
padding: 9px 0;
+
+ a {
+ color: gray;
+ }
}
/* Pagination */
@@ -451,4 +458,9 @@ html[xmlns] .clearfix {
* html .clearfix {
height: 1%;
-}
\ No newline at end of file
+}
+
+/* Tables */
+table.with-input tr td {
+ line-height: 28px;
+}
diff --git a/app/assets/stylesheets/login.css.scss b/app/assets/stylesheets/login.css.scss
index 0dfb4fd..4d4ee31 100644
--- a/app/assets/stylesheets/login.css.scss
+++ b/app/assets/stylesheets/login.css.scss
@@ -30,10 +30,8 @@
background-position: 8px 50%;
background-repeat: no-repeat;
padding: 1em 1.5em 1em 2.75em;
- background-color: #FBFBFB;
background-position: 1em 50%;
background-repeat: no-repeat;
- border: 1px solid #E5E5E5;
width: 23em;
margin-top: 0.5em;
height: auto;
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a4b33ac..4a6415c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -4,23 +4,28 @@ def get_bread_crumb(url)
breadcrumb = ''
so_far = '/'
elements = url.split('/')
- for i in 1...elements.size
-
- so_far += elements[i] + '/'
-
- if elements[i] =~ /^\d+$/
- begin
- breadcrumb += '
' + link_to_if(i != elements.size - 1, eval("#{elements[i - 1].singularize.camelize}.find(#{elements[i]}).name").gsub("_"," ").to_s, so_far) + ''
- rescue
- breadcrumb += '' + elements[i] + ''
+
+ if elements.size > 3
+ for i in 1...elements.size
+
+ so_far += elements[i] + '/'
+
+ if elements[i] =~ /^\d+$/
+ begin
+ breadcrumb += '' + link_to_if(i != elements.size - 1, eval("#{elements[i - 1].singularize.camelize}.find(#{elements[i]}).name").gsub("_"," ").to_s, so_far) + ''
+ rescue
+ breadcrumb += '' + elements[i] + ''
+ end
+ else
+ breadcrumb += '' + link_to_if(i != elements.size - 1, (I18n.t 'url.' + elements[i].gsub("-", "_").gsub(/\?.*/, '')), so_far) + ''
end
- else
- breadcrumb += '' + link_to_if(i != elements.size - 1, (I18n.t 'url.' + elements[i].gsub("-", "_").gsub(/\?.*/, '')), so_far) + ''
+
+ breadcrumb += " / " if i != elements.size - 1
end
-
- breadcrumb += " / " if i != elements.size - 1
+ breadcrumb
+ else
+ false
end
- breadcrumb
rescue
'Not available'
end
diff --git a/app/views/files/_form.html.haml b/app/views/files/_form.html.haml
index 8f3beec..cecc802 100644
--- a/app/views/files/_form.html.haml
+++ b/app/views/files/_form.html.haml
@@ -4,15 +4,15 @@
.clearfix
= f.label :title
.input
- = f.text_field :title
+ = f.text_field :title, :class => 'span6'
.clearfix
= f.label :description
.input
- = f.text_area :description, :rows => 5
+ = f.text_area :description, :rows => 5, :class => 'span6'
.clearfix
- = label_tag (t 'Upload')
+ = f.label :file
.input
= file_field :file, :upload
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 2393991..48de208 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -48,10 +48,13 @@
%li.divider
%li= link_to (t 'Logout'), logout_path, :class => 'logout'
+ - if session[:user] && get_bread_crumb(request.fullpath)
+ .context-breadcrumb
+ .container-fluid
+ %ul.breadcrumb= get_bread_crumb(request.fullpath).html_safe
+
.context-header
.container-fluid
- - if session[:user]
- %ul.breadcrumb= get_bread_crumb(request.fullpath).html_safe
= yield :title
.container-fluid
- if notice
diff --git a/app/views/professor/absences/index.html.haml b/app/views/professor/absences/index.html.haml
index a4201a7..9321454 100644
--- a/app/views/professor/absences/index.html.haml
+++ b/app/views/professor/absences/index.html.haml
@@ -10,7 +10,7 @@
%li= link_to (t 'Back'), professor_lecture_lesson_path(@lecture, @lesson), :class => 'back'
= form_tag({:action => :create}) do
- %table
+ %table.with-input
%thead
%tr
%th= t 'activerecord.attributes.lesson_absence.lecture_student_id'
@@ -22,7 +22,7 @@
= lecture_student.name
= hidden_field_tag 'lecture_student_id[]', lecture_student.id
%td
- = text_field_tag 'lecture_student_ammount[]', @absences[lecture_student.id]
+ = text_field_tag 'lecture_student_ammount[]', @absences[lecture_student.id], :class => 'span2'
.actions
= submit_tag nil, :class => 'btn primary'
diff --git a/app/views/professor/test_results/index.html.haml b/app/views/professor/test_results/index.html.haml
index 4809995..0f0bda1 100644
--- a/app/views/professor/test_results/index.html.haml
+++ b/app/views/professor/test_results/index.html.haml
@@ -10,7 +10,7 @@
%li= link_to (t 'Back'), professor_lecture_test_path(@lecture, @test), :class => 'back'
= form_tag({:action => :create}) do
- %table
+ %table.with-input
%thead
%tr
%th= t 'activerecord.attributes.test_result.lecture_student_id'
diff --git a/app/views/search/all.html.haml b/app/views/search/all.html.haml
index deeb537..8811566 100644
--- a/app/views/search/all.html.haml
+++ b/app/views/search/all.html.haml
@@ -1,4 +1,4 @@
-%header.page-header
+- content_for :title do
%h1= (t 'Search') + ': ' + @query
%h3= t 'Students'
@@ -27,4 +27,4 @@
%tr
%td= link_to professor.name, @user.is_admin? ? admin_professor_path(professor) : user_path(professor.person)
- else
- %p= t 'NoResultsFound'
+ %p.alert-message.block-message.warning= t 'NoResultsFound'
diff --git a/app/views/student/home/index.html.haml b/app/views/student/home/index.html.haml
index 1b656c0..16ac008 100644
--- a/app/views/student/home/index.html.haml
+++ b/app/views/student/home/index.html.haml
@@ -1,4 +1,4 @@
-%header.page-header
+- content_for :title do
%h1= t 'Welcome'
%aside{:class => "sidebar aside-clean"}
diff --git a/app/views/student/lectures/index.html.haml b/app/views/student/lectures/index.html.haml
index 65bb17b..47abb47 100644
--- a/app/views/student/lectures/index.html.haml
+++ b/app/views/student/lectures/index.html.haml
@@ -1,4 +1,4 @@
-%header.page-header
+- content_for :title do
%h1= t 'Lectures'
%table
diff --git a/config/database.yml b/config/database.yml
index 81962ac..eada054 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -11,7 +11,7 @@
development:
adapter: postgresql
encoding: unicode
- database: uni_development
+ database: uni_core_development
pool: 5
host: localhost
username: postgres
@@ -38,7 +38,7 @@ development:
test:
adapter: postgresql
encoding: unicode
- database: uni_test
+ database: uni_core_test
pool: 5
host: localhost
username: postgres
@@ -47,7 +47,7 @@ test:
production:
adapter: postgresql
encoding: unicode
- database: uni
+ database: uni_core
pool: 5
host: localhost
username: postgres
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 89785cc..c934013 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -102,6 +102,7 @@ en:
title: &title "Title"
description: &description "Description"
name: "File"
+ file: "File"
lecture_student:
lecture_situation_id: "Final Situation"
grade: "Final Grade"
diff --git a/config/locales/pt.yml b/config/locales/pt.yml
index a7a39ad..b60908c 100644
--- a/config/locales/pt.yml
+++ b/config/locales/pt.yml
@@ -102,6 +102,7 @@ pt:
title: &title "Título"
description: &description "Descrição"
name: "Arquivo"
+ file: "Arquivo"
lecture_student:
lecture_situation_id: "Situação Final"
grade: "Nota Final"