Commit 226e10483c57ef4f22852c045fc738a6717f5c2d

Authored by AntonioTerceiro
1 parent 9a1619fe

ActionItem8: updating templates and translation files



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@460 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/application_helper.rb
... ... @@ -99,10 +99,11 @@ module ApplicationHelper
99 99 link_to text, { :profile => profile }.merge(url), options
100 100 end
101 101  
102   - def link_to_document(doc)
  102 + def link_to_document(doc, text = nil)
  103 + text ||= doc.title
103 104 path = doc.full_path.split(/\//)
104 105 profile = path.shift
105   - link_to doc.title, homepage_path(:profile => profile , :page => path)
  106 + link_to text, homepage_path(:profile => profile , :page => path)
106 107 end
107 108  
108 109 # TODO: add the actual links
... ...
app/views/account/index.rhtml
... ... @@ -5,13 +5,10 @@
5 5 <%= _('It is a good idea to change your password from times to times.') %>
6 6 </p>
7 7  
8   -<%# FIXME: to be implemented %>
9   -<!--
10 8 <p>
11   -<%= link_to _('Edit Personal details.'), :action => 'edit_details' %>
  9 +<%= link_to_myprofile _('Edit Personal details.'), :controller => 'profile_editor' %>
12 10 <%= _('You can change your personal details.') %>
13 11 </p>
14   --->
15 12  
16 13 <p>
17 14 <%= link_to _('Logout.'), :action => 'logout' %>
... ...
app/views/cms/_page_list_item.rhtml
... ... @@ -12,10 +12,10 @@
12 12 <%
13 13 # Create the page-level links...
14 14 links = []
15   -links << link_to(pluralize(page.versions.length, 'revision', 'revisions'), :action=>'versions', :id=>page) if page.versions.length > 0
16   -links << link_to('add child page', {:action=>'new', :parent=>page}, :title=> _("Add a child to '%s'") % page.title, :class=>'add-page')
17   -links << link_to_function('reorder children', "ComatoseList.toggle_reorder('page_list_#{page.id}',this,#{page.id}, '%s', '%s')" % [_('reorder children'), _('finished reordering')], :title=> _("Reorder children of '%s'") % page.title, :class=>'reorder-children', :href=>url_for(:action=>'reorder', :id=>page)) if !page.children.empty? and page.children.length > 1
18   -links << link_to('delete', {:action=>'delete', :id=>page}, :confirm=> _('This will delete this page, and any children. Are you sure?'), :title=> _("Delete page '%s' and all it's children") % page.title, :class=>'delete-page', :method=>'post', :onmouseover=>"ComatoseList.item_hover('page_#{page.id}', 'over', true)", :onmouseout=>"ComatoseList.item_hover('page_#{page.id}', 'out', true)") unless @root_pages.include? page
  15 +links << link_to((page.versions.length == 1 ? _('%d revision') : _('%d revisions')) % page.versions.length, :action=>'versions', :id=>page) if page.versions.length > 0
  16 +links << link_to(_('add child document'), {:action=>'new', :parent=>page}, :title=> _("Add a child to '%s'") % page.title, :class=>'add-page')
  17 +links << link_to_function(_('reorder children'), "ComatoseList.toggle_reorder('page_list_#{page.id}',this,#{page.id}, '%s', '%s')" % [_('reorder children'), _('finished reordering')], :title=> _("Reorder children of '%s'") % page.title, :class=>'reorder-children', :href=>url_for(:action=>'reorder', :id=>page)) if !page.children.empty? and page.children.length > 1
  18 +links << link_to(_('delete'), {:action=>'delete', :id=>page}, :confirm=> _('This will delete this page, and any children. Are you sure?'), :title=> _("Delete page '%s' and all it's children") % page.title, :class=>'delete-page', :method=>'post', :onmouseover=>"ComatoseList.item_hover('page_#{page.id}', 'over', true)", :onmouseout=>"ComatoseList.item_hover('page_#{page.id}', 'out', true)") unless @root_pages.include? page
19 19 # Level check, one, two, three...
20 20 collapse_children = (level >= Comatose.config.default_tree_level)
21 21 %>
... ...
app/views/cms/index.rhtml
1 1 <div class="action">
2   - <%= link_to 'Clear Page Cache', :controller=>controller.controller_name, :action=>'expire_page_cache' %>
  2 + <%= link_to _('Clear Page Cache'), :controller=>controller.controller_name, :action=>'expire_page_cache' %>
3 3 </div>
4 4  
5 5 <h1>
... ...
app/views/content_viewer/view_page.rhtml
1 1 <h1><%= @page.title %></h2>
2 2  
  3 +<% if @page.parent %>
  4 + <%= link_to_document(@page.parent, _('Up')) %>
  5 + <hr/>
  6 +<% end %>
  7 +
3 8 <%= @page.to_html %>
  9 +
  10 +<% unless @page.children.empty? %>
  11 + <hr/>
  12 + <ul>
  13 + <% @page.children.each do |item| %>
  14 + <li><%= link_to_document(item) %></li>
  15 + <% end %>
  16 +<% end %>
... ...
po/pt_BR/noosfero.po
... ... @@ -8,7 +8,7 @@ msgid &quot;&quot;
8 8 msgstr ""
9 9 "Project-Id-Version: noosfero 0.1.0~rc1\n"
10 10 "POT-Creation-Date: 2007-09-12 02:25-0300\n"
11   -"PO-Revision-Date: 2007-09-12 02:22-0300\n"
  11 +"PO-Revision-Date: 2007-09-12 02:28-0300\n"
12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 14 "MIME-Version: 1.0\n"
... ... @@ -1076,18 +1076,16 @@ msgid &quot;New Page&quot;
1076 1076 msgstr "Nova Página"
1077 1077  
1078 1078 #: app/views/cms/_page_list_item.rhtml:6
1079   -#, fuzzy
1080 1079 msgid "%d revision"
1081   -msgstr "Uma revisão"
  1080 +msgstr "%d revisão"
1082 1081  
1083 1082 #: app/views/cms/_page_list_item.rhtml:6
1084   -#, fuzzy
1085 1083 msgid "%d revisions"
1086   -msgstr "Uma revisão"
  1084 +msgstr "%d revisões"
1087 1085  
1088 1086 #: app/views/cms/_page_list_item.rhtml:7
1089 1087 msgid "add child document"
1090   -msgstr ""
  1088 +msgstr "adicionar document filho"
1091 1089  
1092 1090 #: app/views/cms/_page_list_item.rhtml:7
1093 1091 msgid "Add a child to '%s'"
... ... @@ -1106,9 +1104,8 @@ msgid &quot;Reorder children of &#39;%s&#39;&quot;
1106 1104 msgstr "Reordenar filhos de '%s'"
1107 1105  
1108 1106 #: app/views/cms/_page_list_item.rhtml:9
1109   -#, fuzzy
1110 1107 msgid "delete"
1111   -msgstr "Excluir"
  1108 +msgstr "excluir"
1112 1109  
1113 1110 #: app/views/cms/_page_list_item.rhtml:9
1114 1111 msgid "This will delete this page, and any children. Are you sure?"
... ...