Mudancas no dashboard, calendario e noticias
This commit is contained in:
@@ -112,9 +112,9 @@ class UsersController < ApplicationController
|
|||||||
|
|
||||||
unless @current_user.courses.empty?
|
unless @current_user.courses.empty?
|
||||||
@news = News.find(:all, :conditions => [ 'receiver_id in (?)', @current_user.courses ],
|
@news = News.find(:all, :conditions => [ 'receiver_id in (?)', @current_user.courses ],
|
||||||
:order => 'timestamp desc')
|
:order => 'timestamp desc', :limit => 5)
|
||||||
@events = Event.find(:all, :conditions => [ 'course_id in (?) and (date > ?) and (date < ?)',
|
@events = Event.find(:all, :conditions => [ 'course_id in (?) and (date > ?) and (date < ?)',
|
||||||
@current_user.courses, 1.day.ago, 14.days.from_now ], :order => 'date, time')
|
@current_user.courses, 1.day.ago, 21.days.from_now ], :order => 'date')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ class Event < ActiveRecord::Base
|
|||||||
courses.each do |course|
|
courses.each do |course|
|
||||||
course.events.each do |user_event|
|
course.events.each do |user_event|
|
||||||
event = Icalendar::Event.new
|
event = Icalendar::Event.new
|
||||||
event.start = user_event.date
|
event.start = user_event.time
|
||||||
event.end = user_event.date
|
event.end = user_event.time
|
||||||
event.summary = "#{course.short_name}: #{user_event.title}"
|
event.summary = "#{course.short_name}: #{user_event.title}"
|
||||||
event.description = user_event.description
|
event.description = user_event.description
|
||||||
cal.add(event)
|
cal.add(event)
|
||||||
|
|||||||
@@ -8,8 +8,9 @@
|
|||||||
.box
|
.box
|
||||||
%ul
|
%ul
|
||||||
- if logged_in?
|
- if logged_in?
|
||||||
- unless @current_user.courses.empty?
|
%h3 Disciplinas Matriculadas
|
||||||
%h3 Disciplinas matriculadas
|
- if @current_user.courses.empty?
|
||||||
|
%li.no_itens Nenhuma disciplina matriculada
|
||||||
- for course in @current_user.courses
|
- for course in @current_user.courses
|
||||||
%li{highlight(course.id)}
|
%li{highlight(course.id)}
|
||||||
.right
|
.right
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
%dd= text_field 'event', 'title'
|
%dd= text_field 'event', 'title'
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label{:for => "event_date"} Data
|
%label{:for => "event_time"} Data
|
||||||
%dd= date_select 'event', 'date', :order => [:day, :month, :year]
|
%dd= date_select 'event', 'time', :order => [:day, :month, :year]
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label{:for => "event_time"} Horário
|
%label{:for => "event_time"} Horário
|
||||||
%dd= time_select 'event', 'time'
|
%dd= time_select 'event', 'time', { :minute_step => 5 }
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label{:for => "event_description"} Descrição
|
%label{:for => "event_description"} Descrição
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
= javascript_include_tag 'events'
|
||||||
|
|
||||||
- cache do
|
- cache do
|
||||||
|
|
||||||
- last_event = nil
|
- last_date = nil
|
||||||
|
|
||||||
.cmd
|
.cmd
|
||||||
= action_icon 'add', 'Adicionar evento', new_course_event_url
|
= action_icon 'add', 'Adicionar evento', new_course_event_url
|
||||||
@@ -9,31 +11,27 @@
|
|||||||
%h1.title Calendário
|
%h1.title Calendário
|
||||||
|
|
||||||
.box.div_calendario
|
.box.div_calendario
|
||||||
|
- if !@events.empty?
|
||||||
|
%table
|
||||||
- @events.each do |event|
|
- @events.each do |event|
|
||||||
- if last_event != event.date
|
%tr[event]
|
||||||
= "</ul></div>" if last_event
|
%td.top.aright{:width => '1%'}
|
||||||
.date= event.date.strftime("%d de %B")
|
= event.time.strftime("%d de %B") #unless event.time == last_date
|
||||||
= "<div><ul>"
|
%td.top{:width => '1%'}
|
||||||
|
= event.time.strftime("%H:%M")
|
||||||
%li[event]
|
%td.top
|
||||||
.time= event.time.strftime("%H:%M")
|
.title=link_to h(event.title), course_event_url(@course, event)
|
||||||
= link_to h(event.title), course_event_url(@course, event)
|
.description{:style => (event.id == params[:id].to_i ? '' : 'display: none')}
|
||||||
|
%div.cmd
|
||||||
%div.description{:style => (event.id == params[:id].to_i ? '' : 'display: none')}
|
|
||||||
%div.cmd{:style => "height: 27px; margin-top: -27px;"}
|
|
||||||
= action_icon 'edit', 'Editar', edit_course_event_url(@course, event)
|
= action_icon 'edit', 'Editar', edit_course_event_url(@course, event)
|
||||||
= action_icon 'trash', 'Excluir', course_event_url(@course, event), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
= action_icon 'trash', 'Excluir', course_event_url(@course, event), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||||
= h(event.description)
|
= h(event.description)
|
||||||
= "Sem descrição" if event.description.empty?
|
= "Sem descrição" if event.description.empty?
|
||||||
|
|
||||||
- last_event = event.date
|
- last_date = event.time
|
||||||
|
- else
|
||||||
= "</ul></div>" if !@events.empty?
|
|
||||||
|
|
||||||
- if @events.empty?
|
|
||||||
.box
|
.box
|
||||||
%ul
|
%ul
|
||||||
%li.grey Nenhum evento
|
%li.no_itens Nenhum evento
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
%h4.title= h(@course.full_name)
|
%h4.title= h(@course.full_name)
|
||||||
%h1.title Mudanças recentes
|
%h1.title Mudanças recentes
|
||||||
|
|
||||||
%table.log
|
.box
|
||||||
|
%table
|
||||||
%tr
|
%tr
|
||||||
%th Data
|
%th Data
|
||||||
%th Usuário
|
%th Usuário
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
= javascript_include_tag 'news'
|
||||||
|
|
||||||
- cache do
|
- cache do
|
||||||
|
|
||||||
.cmd
|
.cmd
|
||||||
@@ -8,21 +10,22 @@
|
|||||||
|
|
||||||
= auto_discovery_link_tag :rss, formatted_course_news_index_url(@course, :rss)
|
= auto_discovery_link_tag :rss, formatted_course_news_index_url(@course, :rss)
|
||||||
|
|
||||||
.news
|
.box.div_news
|
||||||
|
- if !@course.news.empty?
|
||||||
|
%table
|
||||||
- @course.news.each do |n|
|
- @course.news.each do |n|
|
||||||
.line{:class => 'new', :id => "news_#{n.id}"}
|
%tr[n]
|
||||||
.cmd{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
|
%td.top.aright
|
||||||
|
= n.timestamp.strftime("%d de %B")
|
||||||
|
%td
|
||||||
|
.title= link_to h(n.title), course_news_url(@course, n)
|
||||||
|
.description{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
|
||||||
|
.cmd
|
||||||
= action_icon 'edit', 'Editar', edit_course_news_url(@course, n)
|
= action_icon 'edit', 'Editar', edit_course_news_url(@course, n)
|
||||||
= action_icon 'trash', 'Excluir', course_news_url(@course, n), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
= action_icon 'trash', 'Excluir', course_news_url(@course, n), :confirm => 'Tem certeza que deseja excluir?', :method => :delete
|
||||||
|
|
||||||
.left= n.timestamp.strftime("%d de %B")
|
|
||||||
%h4
|
|
||||||
= link_to h(n.title), course_news_url(@course, n)
|
|
||||||
|
|
||||||
%p{:style => (n.id == params[:id].to_i ? '' : 'display: none')}
|
|
||||||
= h(n.body)
|
= h(n.body)
|
||||||
|
= "Sem descrição" if n.body.empty?
|
||||||
- if @course.news.empty?
|
- else
|
||||||
.box
|
.box
|
||||||
%ul
|
%ul
|
||||||
%li.grey Nenhuma notícia
|
%li.no_itens Nenhuma notícia
|
||||||
|
|||||||
@@ -254,9 +254,6 @@ body {
|
|||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content p:first-child {
|
|
||||||
margin-top: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#innerwrapper_2column {
|
#innerwrapper_2column {
|
||||||
padding: 0em 0px 0em 208px;
|
padding: 0em 0px 0em 208px;
|
||||||
@@ -388,7 +385,7 @@ h4.title, h1.title {
|
|||||||
margin: 18px 0px;
|
margin: 18px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box h3, .box th {
|
.box h3 {
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
@@ -408,37 +405,21 @@ h4.title, h1.title {
|
|||||||
border-bottom: 1px solid #f4f4f4;
|
border-bottom: 1px solid #f4f4f4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div_calendario .date {
|
.div_calendario table, .div_news table {
|
||||||
line-height: 36px;
|
width: 100%;
|
||||||
width: 105px;
|
}
|
||||||
text-align: right;
|
.div_calendario table tr td, .div_news table tr td {
|
||||||
float: left;
|
padding-top: 9px;
|
||||||
|
padding-bottom: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div_calendario ul {
|
.div_calendario table tr td:first-child, .div_news table tr td:first-child {
|
||||||
padding-left: 115px;
|
padding-left: 18px;
|
||||||
margin-top: -1px;
|
|
||||||
margin-bottom: 0em;
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
list-style: none !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.div_calendario li {
|
.div_calendario .cmd, .div_news .cmd {
|
||||||
border-bottom: 1px solid #eee;
|
margin-top: -9px;
|
||||||
}
|
line-weigth: 9px;
|
||||||
|
|
||||||
.div_calendario .time {
|
|
||||||
padding-right: 1em;
|
|
||||||
width: 3em;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.div_calendario .description {
|
|
||||||
padding-left: 4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.news {
|
|
||||||
margin-top: 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -532,30 +513,6 @@ select {
|
|||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.news .left {
|
|
||||||
float: left;
|
|
||||||
line-height: 18px;
|
|
||||||
margin: 0px;
|
|
||||||
width: 105px;
|
|
||||||
padding-top: 8px;
|
|
||||||
padding-right: 15px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.news h4 {
|
|
||||||
margin: 8px 0px;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.news p {
|
|
||||||
padding-left: 120px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.news .line {
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
margin-bottom: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.history {
|
.history {
|
||||||
@@ -662,9 +619,6 @@ textarea {
|
|||||||
border-top: 1px solid #bbb;
|
border-top: 1px solid #bbb;
|
||||||
}
|
}
|
||||||
|
|
||||||
xbody { background-image: url(<%= App.base_path %>/prototype/line.png); }
|
|
||||||
xhtml * { background-color: transparent !important; }
|
|
||||||
|
|
||||||
.menu, .content, #location {
|
.menu, .content, #location {
|
||||||
border-right: 2px solid #ddd;
|
border-right: 2px solid #ddd;
|
||||||
border-bottom: 2px solid #ddd;
|
border-bottom: 2px solid #ddd;
|
||||||
@@ -741,38 +695,40 @@ text-align: center;
|
|||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.log li {
|
/*.box ul li {
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
padding: 4px 0px 4px 15px;
|
padding: 9px 0px 9px 15px;
|
||||||
background-position: 0px 12px;
|
background-position: 0px 12px;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
table.log {
|
.box table {
|
||||||
margin-top: 18px;
|
margin-bottom: 2px;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
/*width: 100%;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table.log td {
|
.box table td {
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.log th {
|
.box table th {
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.top { vertical-align: top; }
|
||||||
|
.center { text-align: center !important; }
|
||||||
|
.left { float: left !important; }
|
||||||
|
.right { float: right !important; }
|
||||||
|
.aright { text-align: right !important; }
|
||||||
|
|
||||||
.pagination {
|
.pagination {
|
||||||
margin: 18px 0px;
|
margin: 18px 0px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left { float: left !important; }
|
|
||||||
.right { float: right !important; }
|
|
||||||
|
|
||||||
.fieldWithErrors input, .fieldWithErrors textarea {
|
.fieldWithErrors input, .fieldWithErrors textarea {
|
||||||
border: 2px solid #c00;
|
border: 2px solid #c00;
|
||||||
}
|
}
|
||||||
@@ -795,6 +751,13 @@ table.log th {
|
|||||||
#wiki_text h3 { font-size: 12px; }
|
#wiki_text h3 { font-size: 12px; }
|
||||||
#wiki_text h4, #wiki_text h5, #wiki_text h6 { font-size: 11px; }
|
#wiki_text h4, #wiki_text h5, #wiki_text h6 { font-size: 11px; }
|
||||||
|
|
||||||
|
.box h3. {
|
||||||
|
margin-bottom: -9px;
|
||||||
|
margin-top: 18px;
|
||||||
|
padding-top: 9px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.content ol li {
|
.content ol li {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
@@ -803,3 +766,24 @@ table.log th {
|
|||||||
ul ul, ul ol, ol ul, ol ol {
|
ul ul, ul ol, ol ul, ol ol {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li p, td p {
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard td:first-child {
|
||||||
|
padding-left: 27px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard table tr td {
|
||||||
|
padding-right: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard .box ul {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xbody { background-image: url(<%= App.base_path %>/prototype/line.png); background-repeat: repeat; }
|
||||||
|
xhtml * { background-color: transparent !important; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
<% last_event = nil %>
|
|
||||||
|
|
||||||
<h4 class="title">Dashboard</h4>
|
|
||||||
<h1 class="title">Bem vindo, <%= h(@current_user.display_name) %></h1>
|
|
||||||
|
|
||||||
<!-- Noticias -->
|
|
||||||
<div class="news box">
|
|
||||||
<h3>Notícias recentes</h3>
|
|
||||||
<% @news.each do |n| %>
|
|
||||||
<div class="line">
|
|
||||||
<h4 class="left"><%= n.timestamp.strftime("%d de %B") %></h4>
|
|
||||||
<h4><%= link_to h(n.course.full_name) , course_url(n.course) %> ›
|
|
||||||
<%= link_to h(n.title), course_news_url(n.course, n) %></h4>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Calendario -->
|
|
||||||
<div class="box div_calendario">
|
|
||||||
<h3>Próximos eventos</h3>
|
|
||||||
|
|
||||||
<% @events.each do |event| %>
|
|
||||||
<% if last_event != event.date %>
|
|
||||||
<% if last_event %></ul></div><% end %>
|
|
||||||
<div class="date"><%= event.date.strftime("%d de %B") %></div>
|
|
||||||
<div><ul>
|
|
||||||
<% end %>
|
|
||||||
<li>
|
|
||||||
<div class="time"><%= event.time.strftime("%H:%M") %></div>
|
|
||||||
<%= link_to h(event.course.full_name), course_url(event.course) %> ›
|
|
||||||
<%= link_to h(event.title), course_event_url(event.course, event) %>
|
|
||||||
</li>
|
|
||||||
<% last_event = event.date %>
|
|
||||||
<% end %>
|
|
||||||
<%= "</ul></div>" if !@events.empty? %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Disciplinas Matriculadas -->
|
|
||||||
<div class="box">
|
|
||||||
<h3>Disciplinas Matriculadas</h3>
|
|
||||||
<ul class="wiki">
|
|
||||||
<% @current_user.courses.each do |course| %>
|
|
||||||
<li><%= link_to h(course.full_name), course_url(course) %></li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h4><%#= link_to 'Descadastrar usuário', :action => 'destroy'%></h4>
|
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
cell_text = d.mday
|
cell_text = d.mday
|
||||||
cell_attrs = {:class => 'day'}
|
cell_attrs = {:class => 'day'}
|
||||||
@events.each do |e|
|
@events.each do |e|
|
||||||
if e.date == d
|
if e.time == d
|
||||||
cell_attrs[:onclick] = "show_events('#{d.to_s}')"
|
cell_attrs[:onclick] = "show_events('#{d.to_s}')"
|
||||||
cell_attrs[:class] = 'specialDay'
|
cell_attrs[:class] = 'specialDay'
|
||||||
cell_text = link_to d.mday, "#"
|
cell_text = link_to d.mday, "#"
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
<div class="widget_events">
|
<div class="widget_events">
|
||||||
<ul>
|
<ul>
|
||||||
<% @events.each do |e| -%>
|
<% @events.each do |e| -%>
|
||||||
<li style="display: none" class="event_item events_<%=e.date.to_s%>">
|
<li style="display: none" class="event_item events_<%=e.time.to_s%>">
|
||||||
<%= link_to e.date.strftime("%d de %B"), course_event_url(@course, e) %>.
|
<%= link_to e.time.strftime("%d de %B"), course_event_url(@course, e) %>.
|
||||||
<%= h(e.title) %>. <%= h(e.description) %>
|
<%= h(e.title) %>. <%= h(e.description) %>
|
||||||
</li>
|
</li>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
.menu
|
.menu
|
||||||
%h1= "User"[].titleize
|
%h1= "User"[].titleize
|
||||||
%ul
|
%ul
|
||||||
/%li= link_to "Dashboard"[].titleize, dashboard_path
|
%li= link_to "Dashboard"[].titleize, dashboard_path
|
||||||
%li= link_to("User profile"[].titleize, user_url(@current_user))
|
%li= link_to("User profile"[].titleize, user_url(@current_user))
|
||||||
%li= link_to("Edit settings"[].titleize, settings_url)
|
%li= link_to("Edit settings"[].titleize, settings_url)
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
- form_tag diff_course_wiki_url(@course, @wiki_page), :method => :get do
|
- form_tag diff_course_wiki_url(@course, @wiki_page), :method => :get do
|
||||||
%button{:type => "submit"}= "Comparar as versões selecionadas"
|
%button{:type => "submit"}= "Comparar as versões selecionadas"
|
||||||
%table.log
|
.box
|
||||||
|
%table
|
||||||
%tr
|
%tr
|
||||||
%th.narrow
|
%th.narrow
|
||||||
%th.narrow
|
%th.narrow
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 28) do
|
ActiveRecord::Schema.define(:version => 29) do
|
||||||
|
|
||||||
create_table "attachments", :force => true do |t|
|
create_table "attachments", :force => true do |t|
|
||||||
t.string "file_name", :null => false
|
t.string "file_name", :null => false
|
||||||
@@ -38,7 +38,7 @@ ActiveRecord::Schema.define(:version => 28) do
|
|||||||
|
|
||||||
create_table "events", :force => true do |t|
|
create_table "events", :force => true do |t|
|
||||||
t.string "title", :null => false
|
t.string "title", :null => false
|
||||||
t.date "date", :null => false
|
t.date "date"
|
||||||
t.datetime "time", :null => false
|
t.datetime "time", :null => false
|
||||||
t.integer "created_by", :null => false
|
t.integer "created_by", :null => false
|
||||||
t.integer "course_id", :default => 0, :null => false
|
t.integer "course_id", :default => 0, :null => false
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ module AuthenticationSystem
|
|||||||
session[:return_to] = nil
|
session[:return_to] = nil
|
||||||
redirect_to return_to
|
redirect_to return_to
|
||||||
else
|
else
|
||||||
redirect_to index_url
|
redirect_to dashboard_url
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
2
vendor/plugins/brazilian-rails/init.rb
vendored
2
vendor/plugins/brazilian-rails/init.rb
vendored
@@ -17,7 +17,7 @@ String.send(:include, StringPortuguese)
|
|||||||
old_verbose = $VERBOSE
|
old_verbose = $VERBOSE
|
||||||
$VERBOSE = nil
|
$VERBOSE = nil
|
||||||
[Time, Date].each do |clazz|
|
[Time, Date].each do |clazz|
|
||||||
eval "#{clazz}::MONTHNAMES = [nil] + %w(Janeiro Fevereiro Marco Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro)"
|
eval "#{clazz}::MONTHNAMES = [nil] + %w(Janeiro Fevereiro Março Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro)"
|
||||||
eval "#{clazz}::DAYNAMES = %w(Domingo Segunda-Feira Terca-Feira Quarta-Feira Quinta-Feira Sexta-Feira Sabado)"
|
eval "#{clazz}::DAYNAMES = %w(Domingo Segunda-Feira Terca-Feira Quarta-Feira Quinta-Feira Sexta-Feira Sabado)"
|
||||||
eval "#{clazz}::ABBR_MONTHNAMES = [nil] + %w(Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez)"
|
eval "#{clazz}::ABBR_MONTHNAMES = [nil] + %w(Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez)"
|
||||||
eval "#{clazz}::ABBR_DAYNAMES = %w(Dom Seg Ter Qua Qui Sex Sab)"
|
eval "#{clazz}::ABBR_DAYNAMES = %w(Dom Seg Ter Qua Qui Sex Sab)"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class TimeTest < Test::Unit::TestCase
|
|||||||
assert_equal [nil,
|
assert_equal [nil,
|
||||||
"Janeiro",
|
"Janeiro",
|
||||||
"Fevereiro",
|
"Fevereiro",
|
||||||
"Marco",
|
"Março",
|
||||||
"Abril",
|
"Abril",
|
||||||
"Maio",
|
"Maio",
|
||||||
"Junho",
|
"Junho",
|
||||||
|
|||||||
Reference in New Issue
Block a user