Minor fixes
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
.box.repositorio
|
||||
- if !@course.attachments.empty?
|
||||
%ul
|
||||
= nested_attachments_to_html(attachments_to_nested_hash(@course.attachments))
|
||||
= raw nested_attachments_to_html(attachments_to_nested_hash(@course.attachments))
|
||||
|
||||
- else
|
||||
.box
|
||||
|
||||
@@ -33,5 +33,5 @@
|
||||
|
||||
%h3
|
||||
Outros Semestres
|
||||
%li= link_to "2008.2", period: '2008.2'
|
||||
%li= link_to "2008.1", period: '2008.1'
|
||||
- for period in Course.pluck_periods
|
||||
%li= link_to period.to_s, period: period
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
%h3= t(:repository)
|
||||
.repositorio
|
||||
= nested_attachments_to_html(attachments_to_nested_hash(@course.attachments.find_front_page))
|
||||
= raw nested_attachments_to_html(attachments_to_nested_hash(@course.attachments.find_front_page))
|
||||
- if @course.attachments.empty?
|
||||
%ul.wiki
|
||||
%li.no_itens= t(:no_attachments)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
%title= @title || App.title
|
||||
%meta{'name' => 'robots', :content => 'noindex,nofollow'}
|
||||
%meta{'http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8'}
|
||||
%meta{'name' => "viewport", 'content' => "width=device-width" }
|
||||
|
||||
= stylesheet_link_tag :wiki
|
||||
%link{'href' => "#{App.base_path}/favicon.ico", 'rel' => 'icon', 'type' => 'image/vnd.microsoft.icon'}
|
||||
@@ -26,44 +27,48 @@
|
||||
= csrf_meta_tag
|
||||
|
||||
%body{'onload' => 'javascript: startup()'}
|
||||
#wrapper
|
||||
#header
|
||||
%h1= "<strong>Wiki</strong> UFC"
|
||||
|
||||
#header_menu
|
||||
#header
|
||||
.wrapper2
|
||||
%h1
|
||||
%strong Wiki
|
||||
UFC
|
||||
#header_menu
|
||||
.wrapper2
|
||||
%ul
|
||||
- if logged_in?
|
||||
%li.grey= t(:logged_in_as, :u => h(@current_user.display_name))
|
||||
%li.grey= h(@current_user.display_name)
|
||||
%li.last= link_to 'Logout', logout_path, :accesskey => 'l'
|
||||
- else
|
||||
%li= link_to 'Cadastrar', signup_path
|
||||
%li.last= link_to 'Login', login_path, :accesskey => 'l'
|
||||
#wrapper
|
||||
.wrapper2
|
||||
#strip
|
||||
|
||||
#strip
|
||||
#flash
|
||||
= flash_div
|
||||
#location
|
||||
= @location
|
||||
|
||||
#location
|
||||
= flash_div
|
||||
= @location
|
||||
|
||||
#site
|
||||
%div
|
||||
- if @right_panel.nil?
|
||||
.float_panel_left= @left_panel
|
||||
#innerwrapper_2column
|
||||
.content= @content
|
||||
- else
|
||||
.float_panel_left= @left_panel
|
||||
.float_panel_right= @right_panel
|
||||
#innerwrapper_3column
|
||||
.content= @content
|
||||
%br{'style' => 'clear:both'}
|
||||
#site
|
||||
%div
|
||||
- if @right_panel.nil?
|
||||
.float_panel_left= @left_panel
|
||||
#innerwrapper_2column
|
||||
.content= @content
|
||||
- else
|
||||
.float_panel_left= @left_panel
|
||||
.float_panel_right= @right_panel
|
||||
#innerwrapper_3column
|
||||
.content= @content
|
||||
%br{'style' => 'clear:both'}
|
||||
|
||||
#footer
|
||||
%p
|
||||
%b Wiki
|
||||
UFC
|
||||
%p
|
||||
Powered by Ruby on Rails, PostgreSQL & Linux
|
||||
Desenvolvido em Ruby on Rails
|
||||
%p
|
||||
Distribuido livremente sob a
|
||||
%a{href: 'https://www.gnu.org/licenses/agpl-3.0.en.html'}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
- @title = "#{App.title} - #{h(@course.full_name)}"
|
||||
- @location = capture do
|
||||
- @location = capture do
|
||||
= link_to(App.title, index_url, :accesskey => 'z') + "›"
|
||||
= link_to("Disciplinas", courses_url) + "›"
|
||||
= link_to(h(@course.full_name), course_url(@course)) + "›"
|
||||
= link_to("Arquivos", course_attachments_url(@course))
|
||||
- if @attachment.id
|
||||
= "›" + link_to(truncate(h(@attachment.file_name)), course_attachment_url)
|
||||
= "›"
|
||||
=link_to(truncate(h(@attachment.file_name)), course_attachment_url)
|
||||
- @title = @title + " - #{truncate(h(@attachment.file_name))}"
|
||||
|
||||
- @left_panel = render 'courses/left_panel'
|
||||
- @right_panel = render 'courses/right_panel'
|
||||
- @content = yield
|
||||
|
||||
= render 'layouts/base'
|
||||
= render 'layouts/base'
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
= link_to(App.title, index_url, :accesskey => 'z') + "›";
|
||||
= link_to("Disciplinas", courses_url)
|
||||
- if @course and @course.id
|
||||
= "› " + link_to(h(@course.full_name), course_url)
|
||||
= "› "
|
||||
=link_to(h(@course.full_name), course_url)
|
||||
- @title = @title + " - #{h(@course.full_name)}"
|
||||
- else
|
||||
- @title = @title + " - Disciplinas"
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
= link_to(App.title, index_url, :accesskey => 'z') + "›";
|
||||
= link_to("Usuários", users_path)
|
||||
- if @user and @user.id
|
||||
= "› " + link_to(h(@user.name), user_url(@user))
|
||||
= "› "
|
||||
=link_to(h(@user.name), user_url(@user))
|
||||
- @title = @title + " - #{h(@user.display_name)}"
|
||||
|
||||
- @left_panel = render('widgets/menu_navigation') + render('widgets/menu_user')
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
- @title = "#{App.title} - #{h(@course.full_name)}"
|
||||
- @location = capture do
|
||||
- @location = capture do
|
||||
= link_to(App.title, index_url, :accesskey => 'z') + "›"
|
||||
= link_to("Disciplinas", courses_url) + "›"
|
||||
= link_to(h(@course.full_name), course_url(@course)) + "›"
|
||||
= link_to("Wiki", course_wiki_url(@course))
|
||||
- if @wiki_page.title?
|
||||
= "›" + link_to(h(@wiki_page.title), course_wiki_instance_url(@course.to_param, @wiki_page))
|
||||
= "›"
|
||||
=link_to(h(@wiki_page.title), course_wiki_instance_url(@course.to_param, @wiki_page))
|
||||
- @title = @title + " - #{h(@wiki_page.title)}"
|
||||
|
||||
- @left_panel = render 'courses/left_panel'
|
||||
- @content = yield
|
||||
|
||||
= render 'layouts/base'
|
||||
= render 'layouts/base'
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
= "excluiu " if entry.kind_of?(AttachmentDeleteLogEntry)
|
||||
= "restaurou " if entry.kind_of?(AttachmentRestoreLogEntry)
|
||||
|
||||
= "o anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))
|
||||
= raw "o anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
= "restaurou " if entry.kind_of?(WikiRestoreLogEntry)
|
||||
|
||||
- if entry.version
|
||||
= "a página " + link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id, :version => entry.version))
|
||||
a página
|
||||
=link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id, :version => entry.version))
|
||||
- else
|
||||
= "a página " + link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id))
|
||||
a página
|
||||
=link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id))
|
||||
|
||||
|
||||
- current_version = entry.wiki_page.versions.find_by_version(entry.version)
|
||||
@@ -15,12 +17,12 @@
|
||||
- if entry.kind_of?(WikiEditLogEntry)
|
||||
- unless current_version.nil?
|
||||
- if current_version.description and !current_version.description.empty?
|
||||
= "(<i>#{h(current_version.description)}</i>)"
|
||||
= raw "(<i>#{h(current_version.description)}</i>)"
|
||||
|
||||
- unless previous_version.nil?
|
||||
= "(" + link_to("diff", diff_course_wiki_instance_url(entry.course, entry.wiki_page.id, :from => previous_version.version, :to => entry.version)) + ")"
|
||||
|
||||
= "(" + link_to("edit", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
||||
|
||||
= raw "(" + link_to("diff", diff_course_wiki_instance_url(entry.course, entry.wiki_page.id, :from => previous_version.version, :to => entry.version)) + ")"
|
||||
|
||||
= raw "(" + link_to("edit", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
||||
|
||||
- unless previous_version.nil?
|
||||
= "(" + link_to("undo", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{previous_version.version}", :version => previous_version.version)) + ")"
|
||||
= raw "(" + link_to("undo", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{previous_version.version}", :version => previous_version.version)) + ")"
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
%ul.log_entries
|
||||
- @log_entries_by_day.each do |day, entries|
|
||||
%h3
|
||||
=tz(day).strftime("%d de %B de %Y")
|
||||
=tz(day).strftime("%d de %B de %Y")
|
||||
- entries.each do |entry|
|
||||
%li
|
||||
.date
|
||||
= tz(entry.created_at).strftime("%H:%M")
|
||||
%img.avatar{:src => gravatar_url_for(entry.user.email, 27)}
|
||||
=link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
|
||||
= render(:partial => 'log/log_entry', :locals => { :entry => entry })
|
||||
= link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
|
||||
= render(:partial => 'log/log_entry', :locals => { :entry => entry })
|
||||
%br
|
||||
= "Disciplina " + link_to(h(entry.course.full_name), course_url(entry.course))
|
||||
= raw "Disciplina " + link_to(h(entry.course.full_name), course_url(entry.course))
|
||||
|
||||
= will_paginate @log_entries
|
||||
|
||||
@@ -10,15 +10,20 @@
|
||||
%dd= text_field('user', 'name')
|
||||
|
||||
%dt
|
||||
%label{:for => 'user_description'} Descrição
|
||||
%label{:for => 'user_description'}
|
||||
Descrição
|
||||
=markup_enabled_field
|
||||
%dd= preserve(text_area('user', 'description', { :rows => 10 }))
|
||||
|
||||
%dt
|
||||
%label Dica:
|
||||
%p
|
||||
= "Para utilizar um avatar, cadastre-se no site <a href='http://gravatar.com'>Gravatar</a> com o mesmo email utilizado no #{App.title}."
|
||||
Para utilizar um avatar, cadastre-se no site
|
||||
%a{href: 'http://gravatar.com'} Gravatar
|
||||
com o mesmo email utilizado no
|
||||
=App.title
|
||||
|
||||
|
||||
|
||||
- if admin?
|
||||
%dt= check_box_tag('user[admin]', 1, @user.admin?) + " Administrador"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
%dt
|
||||
%label{:for => 'user_password'} Senha
|
||||
%dd
|
||||
= password_field('user', 'password', {:value => '', :id => 'password'})
|
||||
= password_field('user', 'password', {:value => '', :id => 'password'})
|
||||
%span#passmeter
|
||||
|
||||
%dt
|
||||
@@ -40,6 +40,6 @@
|
||||
%dl
|
||||
%dt
|
||||
%label{:for => 'user_color_pref'} Esquema de cores
|
||||
%br
|
||||
= render :partial => 'widgets/color', :collection => App.color_schemes
|
||||
%br.clear
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
- @news.each do |n|
|
||||
%tr
|
||||
%td.top.aright
|
||||
= n.timestamp.strftime("%d de %B")
|
||||
= n.timestamp.strftime("%d de %B")
|
||||
%td
|
||||
= link_to(h(n.course.full_name), course_url(n.course)) + " ›"
|
||||
= link_to(h(n.title), course_news_instance_url(n.course, n))
|
||||
@@ -37,7 +37,7 @@
|
||||
- @events.each do |n|
|
||||
%tr
|
||||
%td.aright.top
|
||||
= n.time.strftime("%d de %B") #unless n.time == last_time
|
||||
= n.time.strftime("%d de %B") #unless n.time == last_time
|
||||
- last_time = n.time
|
||||
%td.top
|
||||
= n.time.strftime("%H:%M")
|
||||
@@ -53,4 +53,3 @@
|
||||
|
||||
- @current_user.courses.each do |course|
|
||||
%li= link_to(h(course.full_name), course_url(course))
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<h1>Disciplina</h1>
|
||||
<ul>
|
||||
<li><%= link_to "Visão Geral", course_url(@course), :accesskey => 'd' %></li>
|
||||
<li><%= link_to "Arquivos", course_attachments_url(@course), :accesskey => 'a' %></li>
|
||||
<li><%= link_to "Calendário", course_events_url(@course), :accesskey => 'c' %></li>
|
||||
<li><%= link_to "Notícias", course_news_url(@course), :accesskey => 'n' %></li>
|
||||
<li><%= link_to "Participantes", course_events_url(@course), :accesskey => 'p' %></li>
|
||||
<li><%= link_to "Páginas Wiki", course_wiki_url(@course), :accesskey => 'w' %></li>
|
||||
<li><%= link_to "Arquivos", course_attachments_url(@course), :accesskey => 'a' %></li>
|
||||
<!-- <li><%= link_to "Calendário", course_events_url(@course), :accesskey => 'c' %></li> -->
|
||||
<!-- <li><%= link_to "Notícias", course_news_url(@course), :accesskey => 'n' %></li> -->
|
||||
<!-- <li><%= link_to "Participantes", course_events_url(@course), :accesskey => 'p' %></li> -->
|
||||
<li><%= link_to "Mudanças recentes", course_log_url(@course), :accesskey => 'r' %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -8,14 +8,11 @@
|
||||
</div>
|
||||
<h1>Participantes</h1>
|
||||
<ul class="widget_users">
|
||||
<% @course.users[0..7].each do |user| %>
|
||||
<li>
|
||||
<img class="avatar" src="<%=gravatar_url_for(user.email, 27)%>"/>
|
||||
<%= link_to h(user.display_name), user_url(user) %>
|
||||
</li>
|
||||
<% @course.users.each do |user| %>
|
||||
<%= link_to(image_tag(gravatar_url_for(user.email, 26), class: 'avatar'), user_url(user), title: user.display_name)%>
|
||||
<% end %>
|
||||
<% if @course.users.size > 0 %>
|
||||
<li><%= link_to("Ver todos os participantes", course_news_url(@course)) %></li>
|
||||
<br style='clear: both' />
|
||||
<% end %>
|
||||
<% if @course.users.empty? %>
|
||||
<li class="no_itens">Nenhum participante</li>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
= action_icon('undo', "Reverter", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{page.version}", :version => page.version)) + " "
|
||||
= link_to tz(page.updated_at).strftime("%d/%m/%y %H:%M:%S"), course_wiki_instance_url(@course, @wiki_page, :version => page.version)
|
||||
= "por #{link_to h(page.user.display_name), user_path(page.user)}" if page.respond_to?(:user) and !page.user.nil?
|
||||
= raw action_icon('undo', "Reverter", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{page.version}", :version => page.version)) + " "
|
||||
= raw link_to tz(page.updated_at).strftime("%d/%m/%y %H:%M:%S"), course_wiki_instance_url(@course, @wiki_page, :version => page.version)
|
||||
= raw "por #{link_to h(page.user.display_name), user_path(page.user)}" if page.respond_to?(:user) and !page.user.nil?
|
||||
|
||||
- if page.description and !page.description.empty?
|
||||
= "(<i>#{h(page.description)}</i>)"
|
||||
= raw "(<i>#{h(page.description)}</i>)"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title= h(@wiki_page.title)
|
||||
%h4.title= @course.full_name
|
||||
%h1.title= @wiki_page.title
|
||||
|
||||
%p
|
||||
Comparando versões:
|
||||
%ul
|
||||
%li= render :partial => 'wiki/history', :locals => { :page => @to }
|
||||
%li= render :partial => 'wiki/history', :locals => { :page => @to }
|
||||
%li= render :partial => 'wiki/history', :locals => { :page => @from }
|
||||
|
||||
= link_to "Comparar outras versões", versions_course_wiki_instance_url(@course, @wiki_page, :from => @from.version, :to => @to.version)
|
||||
= format_diff h(@diff)
|
||||
= raw format_diff h(@diff)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
= javascript_include_tag 'wiki'
|
||||
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title= "Editar #{h(@wiki_page.title)}"
|
||||
%h4.title= @course.full_name
|
||||
%h1.title= "Editar #{(@wiki_page.title)}"
|
||||
|
||||
%p
|
||||
= form_tag course_wiki_instance_url(@course, @wiki_page.id), :method => :put do
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
%li
|
||||
= link_to(w.title, course_wiki_instance_url(@course.to_param, w.to_param))
|
||||
- if w.front_page
|
||||
%i{:class => 'fa fa-home'}
|
||||
%i{class: 'fa fa-home', title: 'Exibido na página inicial do curso'}
|
||||
|
||||
- else
|
||||
.box
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
{:confirm => 'Tem certeza que deseja excluir?', :method => :delete,
|
||||
:accesskey => '-'}
|
||||
|
||||
%h4.title= h(@course.full_name)
|
||||
%h1.title= h(@wiki_page.title)
|
||||
%h4.title= @course.full_name
|
||||
%h1.title= html_escape(@wiki_page.title)
|
||||
#contents{:style => "display: none"}
|
||||
%h1 Índice
|
||||
#wiki_text
|
||||
= @wiki_page.content.format_wiki
|
||||
= @wiki_page.content.format_wiki rescue "<p class='wiki-error'>Invalid wiki syntax</p>".html_safe
|
||||
|
||||
%script
|
||||
= "enumerate_headers();"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
== radios_from = #{h(@history_from)};
|
||||
|
||||
= form_tag diff_course_wiki_instance_url(@course, @wiki_page), :method => :get do
|
||||
%button{:type => "submit"}= "Comparar as versões selecionadas"
|
||||
%button{:type => "submit"} Comparar as versões selecionadas
|
||||
.box
|
||||
%table
|
||||
%tr
|
||||
@@ -24,12 +24,12 @@
|
||||
%input{:type => "radio", :name => "to", :value => entry.version, :onclick => "history_to(#{entry.version})"}
|
||||
%td.narrow
|
||||
%input{:type => "radio", :name => "from", :value => entry.version, :onclick => %"history_from(#{entry.version})"}
|
||||
%td= link_to(tz(entry.updated_at).strftime("%d/%m/%y %H:%M:%S"), course_wiki_instance_url(@course, @wiki_page, :version => entry.version))
|
||||
%td= link_to(tz(entry.updated_at).strftime("%d/%m/%y %H:%M:%S").html_safe, course_wiki_instance_url(@course, @wiki_page, :version => entry.version))
|
||||
%td= link_to truncate(h(User.with_deleted.find(entry.user_id).display_name), :length => 20), user_path(User.with_deleted.find(entry.user_id))
|
||||
%td
|
||||
= entry.description
|
||||
- if (entry.version > @wiki_page.versions.minimum(:version))
|
||||
= "(" + link_to("diff", diff_course_wiki_instance_url(@course, @wiki_page, :from => entry.version - 1, :to => entry.version)) + ")"
|
||||
= "(" + link_to("edit", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
||||
= raw "(" + link_to("diff", diff_course_wiki_instance_url(@course, @wiki_page, :from => entry.version - 1, :to => entry.version)) + ")"
|
||||
= raw "(" + link_to("edit", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
||||
|
||||
/= will_paginate @versions
|
||||
|
||||
Reference in New Issue
Block a user