Permalink
Browse files

minor fixes

  • Loading branch information...
1 parent 701d714 commit e3c1a40f3201457a66bd0df767c499a85349753c @brunocavalcante committed Mar 23, 2012
@@ -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%;
-}
+}
+
+/* Tables */
+table.with-input tr td {
+ line-height: 28px;
+}
@@ -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;
@@ -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 += '<li>' + link_to_if(i != elements.size - 1, eval("#{elements[i - 1].singularize.camelize}.find(#{elements[i]}).name").gsub("_"," ").to_s, so_far) + '</li>'
- rescue
- breadcrumb += '<li>' + elements[i] + '</li>'
+
+ if elements.size > 3
+ for i in 1...elements.size
+
+ so_far += elements[i] + '/'
+
+ if elements[i] =~ /^\d+$/
+ begin
+ breadcrumb += '<li>' + link_to_if(i != elements.size - 1, eval("#{elements[i - 1].singularize.camelize}.find(#{elements[i]}).name").gsub("_"," ").to_s, so_far) + '</li>'
+ rescue
+ breadcrumb += '<li>' + elements[i] + '</li>'
+ end
+ else
+ breadcrumb += '<li>' + link_to_if(i != elements.size - 1, (I18n.t 'url.' + elements[i].gsub("-", "_").gsub(/\?.*/, '')), so_far) + '</li>'
end
- else
- breadcrumb += '<li>' + link_to_if(i != elements.size - 1, (I18n.t 'url.' + elements[i].gsub("-", "_").gsub(/\?.*/, '')), so_far) + '</li>'
+
+ breadcrumb += " <span class='divider'>/</span> " if i != elements.size - 1
end
-
- breadcrumb += " <span class='divider'>/</span> " if i != elements.size - 1
+ breadcrumb
+ else
+ false
end
- breadcrumb
rescue
'Not available'
end
@@ -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
@@ -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
@@ -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'
@@ -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'
@@ -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'
@@ -1,4 +1,4 @@
-%header.page-header
+- content_for :title do
%h1= t 'Welcome'
%aside{:class => "sidebar aside-clean"}
@@ -1,4 +1,4 @@
-%header.page-header
+- content_for :title do
%h1= t 'Lectures'
%table
View
@@ -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
View
@@ -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"
View
@@ -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"

0 comments on commit e3c1a40

Please sign in to comment.