プロジェクト

全般

プロフィール

« | » 

リビジョン 04643542

Martin DENIZET さんが13年以上前に追加

compatible to Redmine1.4 and add Frech language (merge from Martin's github)

差分を表示:

app/controllers/glossary_controller.rb
class GlossaryController < ApplicationController
menu_item :glossary
unloadable
layout 'base'
......
def index_clear
params[:search_index_ch] = nil
redirect_to :controller => 'glossary', :action => 'index', :id => @project
redirect_to :controller => 'glossary', :action => 'index', :project_id => @project
end
......
attach_files(@term, params[:attachments])
flash[:notice] = l(:notice_successful_create)
if (params[:continue])
redirect_to :controller => 'glossary', :action => 'new', :id => @project
redirect_to :controller => 'glossary', :action => 'new', :project_id => @project
else
redirect_to :controller => 'glossary', :action => 'show', :id => @project,
:term_id => @term
redirect_to :controller => 'glossary', :action => 'show', :project_id => @project,
:id => @term
end
end
end
......
if @term.save
attach_files(@term, params[:attachments])
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'glossary', :action => 'show', :id => @project, :term_id => @term
redirect_to(:controller => 'glossary', :action => 'show',
:project_id => @project, :id => @term.id)
return
end
end
......
def destroy
@term.destroy
redirect_to :action => 'index', :id => @project
redirect_to :action => 'index', :project_id => @project
end
def add_term_category
......
respond_to do |format|
format.html do
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'term_categories', :action => 'index', :id => @project
redirect_to :controller => 'term_categories', :action => 'index', :project_id => @project
end
format.js do
term_categories = TermCategory.find(:all, :conditions => "project_id = #{@project.id}")
......
}
Term::update_all("project_id = #{newproj.id}", "project_id = #{@project.id}")
flash[:notice] = l(:notice_successful_update)
redirect_to({:action => 'index', :id => newproj})
redirect_to({:action => 'index', :project_id => newproj})
end
end
......
return unless (ch and !ch.empty?)
charset = get_search_index_charset(ch, type)
searchprms = [:name, :abbr_whole, :rubi]
searchprms << [:name_en] if (type)
searchprms << :name_en if (type)
cnt = 0
charset.each {|tch|
symbols["search_ch_#{cnt}".to_sym] = tch + '%'
......
def find_project
@project = Project.find(params[:id])
project_id = params[:project_id] || (params[:issue] && params[:issue][:project_id])
@project = Project.find(project_id)
rescue ActiveRecord::RecordNotFoundpp
render_404
end
def find_term
@term = Term.find(:first,
:conditions => "project_id = #{@project.id} and id = #{params[:term_id]}")
:conditions => "project_id = #{@project.id} and id = #{params[:id]}")
render_404 unless @term
rescue
render_404
app/controllers/glossary_styles_controller.rb
def search
newparams = {
:controller => 'glossary', :action => 'index', :id => params[:id]
:controller => 'glossary', :action => 'index', :project_id => Project.find(params[:project_id])
}
unless (params[:search_clear])
for prm in [:search_category, :search_str, :latest_days]
......
end
end
newparams = {:controller => 'glossary', :action => 'index',
:id => params[:id],
:project_id => Project.find(params[:project_id]),
:glossary_style_id => @glossary_style_id}
add_search_params(newparams)
redirect_to(newparams)
app/controllers/term_categories_controller.rb
@category = TermCategory.find(:first, :conditions => "project_id = #{@project.id} and id = #{params[:category_id]}")
if request.post? and @category.update_attributes(params[:category])
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'term_categories', :action => 'index', :id => @project
redirect_to :controller => 'term_categories', :action => 'index', :project_id => @project
end
rescue ActiveRecord::RecordNotFound
render_404
......
def change_order
if request.post?
category = TermCategory.find(:first, :conditions => "project_id = #{@project.id} and id = #{params[:category_id]}")
category = TermCategory.find(:first, :conditions => "project_id = #{@project.id} and id = #{params[:id]}")
case params[:position]
when 'highest'; category.move_to_top
when 'higher'; category.move_higher
when 'lower'; category.move_lower
when 'lowest'; category.move_to_bottom
end if params[:position]
redirect_to :controller => 'term_categories', :action => 'index', :id => @project
redirect_to :controller => 'term_categories', :action => 'index', :project_id => @project
end
rescue ActiveRecord::RecordNotFound
render_404
end
def destroy
@category = TermCategory.find(:first, :conditions => "project_id = #{@project.id} and id = #{params[:category_id]}")
@category = TermCategory.find(:first, :conditions => "project_id = #{@project.id} and id = #{params[:id]}")
@term_count = @category.terms.size
if @term_count == 0
@category.destroy
redirect_to :controller => 'term_categories', :action => 'index', :id => @project
redirect_to :controller => 'term_categories', :action => 'index', :project_id => @project
elsif params[:todo]
reassign_to = TermCategory.find(:first, :conditions => "project_id = #{@project.id} and id = #{params[:reassign_to_id]}") if params[:todo] == 'reassign'
@category.destroy(reassign_to)
redirect_to :controller => 'term_categories', :action => 'index', :id => @project
redirect_to :controller => 'term_categories', :action => 'index', :project_id => @project
end
@categories = TermCategory.find(:all, :conditions => "project_id = #{@project.id}") - [@category]
rescue ActiveRecord::RecordNotFound
......
private
def find_project
@project = Project.find(params[:id])
@project = Project.find(params[:project_id])
rescue ActiveRecord::RecordNotFound
render_404
end
app/helpers/glossary_helper.rb
def updated_by(updated, author)
time_tag = content_tag('acronym', distance_of_time_in_words(Time.now, updated), :title => format_time(updated))
author_tag = (author.is_a?(User) && !author.is_a?(AnonymousUser)) ? link_to(h(author), :controller => 'account', :action => 'show', :id => author) : h(author || 'Anonymous')
l(:label_updated_time_by, :author => author_tag, :age => time_tag)
l(:label_updated_time_by,
:author => link_to_user(author), :age => time_tag(updated)).html_safe
end
end
app/helpers/glossary_styles_helper.rb
cnt += 1
str += '<td>'
if (ch and !ch.empty?)
prms = {:controller => 'glossary', :action => 'index', :id => proj,
prms = {:controller => 'glossary', :action => 'index', :project_id => proj,
:search_index_ch => ch}
prms[:search_index_type] = search_index_type if (search_index_type)
str += link_to(ch, prms)
app/models/term.rb
end
end
app/views/glossary/_form.html.erb
<p><%= f.select :category_id, (@term_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
<%= prompt_to_remote(l(:label_term_category_new),
l(:label_term_category_new), 'category[name]',
{:controller => 'glossary', :action => 'add_term_category', :id => @project},
{:controller => 'glossary', :action => 'add_term_category', :project_id => @project},
:class => 'icon icon-add', :tabindex => 199) if authorize_for('glossary', 'add_term_category') %></p>
</div>
<p><%= f.text_area :description, :label=>t('label.description'),
app/views/glossary/_index_in_category.html.erb
<% end %>
<td><%=h truncate(term.description, :length=>50) %></td>
<td align="right">
<%= link_to_if_authorized(image_tag('edit.png'), {:action => 'edit', :id => @project, :term_id => term}, :title => l(:button_edit)) %>
<%= link_to_if_authorized(image_tag('delete.png'), {:action => 'destroy', :id => @project, :term_id => term}, :confirm => l(:text_are_you_sure), :method => :post, :title => l(:button_delete)) %>
<% if term.project_id == @project.id %>
<%= link_to_if_authorized(image_tag('edit.png'), {:action => 'edit', :project_id => @project, :id => term}, :title => l(:button_edit)) %>
<%= link_to_if_authorized(image_tag('delete.png'), {:action => 'destroy', :project_id => @project, :id => term}, :confirm => l(:text_are_you_sure), :method => :post, :title => l(:button_delete)) %>
<% end %>
</td>
</tr>
<% end %>
app/views/glossary/_sidebar.html.erb
<% if User.current.allowed_to?(:manage_terms, @project, :global => true) %>
<h3><%= l(:label_term) %></h3>
<%= link_to(l(:label_term_new), {:controller => 'glossary', :action => 'new', :id => @project}, :class => 'icon icon-add') %>
<%= link_to(l(:label_term_new), {:controller => 'glossary', :action => 'new', :project_id => @project}, :class => 'icon icon-add') %>
<br />
<% if (Term.find(:first, :conditions => "project_id = #{@project.id}")) %>
<%= link_to_if_authorized(l(:label_move_all_terms), {:controller => 'glossary', :action => 'move_all', :id => @project}, :class => 'icon icon-move') %>
<%= link_to_if_authorized(l(:label_move_all_terms), {:controller => 'glossary', :action => 'move_all', :project_id => @project}, :class => 'icon icon-move') %>
<br />
<% end %>
<%= link_to(l(:label_glossary_import_csv), {:controller => 'glossary', :action => 'import_csv', :id => @project}) %>
<%= link_to(l(:label_glossary_import_csv), {:controller => 'glossary', :action => 'import_csv', :project_id => @project}) %>
<br />
<% end %>
<% if User.current.allowed_to?(:manage_term_categories, @project, :global => true) %>
<h3><%= l(:label_term_category) %></h3>
<%= link_to l(:label_term_category_new), {:controller => 'glossary', :action => 'add_term_category', :id => @project}, :class => 'icon icon-add' %>
<%= link_to l(:label_term_category_new), {:controller => 'glossary', :action => 'add_term_category', :project_id => @project}, :class => 'icon icon-add' %>
<br />
<%= link_to l(:label_manage_term_category), { :controller => 'term_categories', :action => 'index', :id => @project } %>
<%= link_to l(:label_manage_term_category), { :controller => 'term_categories', :action => 'index', :project_id => @project } %>
<br />
<% end %>
......
<% if params[:search_index_ch] %>
<div class="contextual">
<%= link_to_if_authorized(l(:button_clear), {:controller => 'glossary', :action => 'index_clear', :id => @project}, :class => 'icon icon-reload') %>
<%= link_to_if_authorized(l(:button_clear), {:controller => 'glossary', :action => 'index_clear', :project_id => @project}, :class => 'icon icon-reload') %>
</div>
<% end %>
app/views/glossary/add_term_category.rhtml
<h2><%=l(:label_term_category_new)%></h2>
<% labelled_tabular_form_for :category, @category, :url => { :action => 'add_term_category' } do |f| %>
<% labelled_tabular_form_for(:category, @category,
:url => { :action => 'add_term_category',
:project_id => @project }) do |f| %>
<%= render :partial => 'term_categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>
app/views/glossary/edit.html.erb
<h2><%= l(:label_term) %> #<%= @term.id %></h2>
<% labelled_tabular_form_for :term, @term,
:url => {:action => 'edit', :id => @project, :term_id => @term},
:url => {:action => 'edit', :project_id => @project, :id => @term},
:html => {:multipart => true, :id => 'term-form'} do |f| %>
<%= error_messages_for 'term' %>
<div class="box">
......
</div>
<%= submit_tag l(:button_edit) %>
<%= link_to_remote l(:label_preview),
{ :url => { :controller => 'glossary', :action => 'preview', :id => @project },
{ :url => { :controller => 'glossary', :action => 'preview', :project_id => @project },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('term-form')",
app/views/glossary/import_csv.html.erb
<h2><%=h l(:label_glossary_import_csv) %> </h2>
<% form_tag({:controller => 'glossary', :action => 'import_csv_exec', :id=>@project},
<% form_tag({:controller => 'glossary', :action => 'import_csv_exec', :project_id=>@project},
{:multipart => true}) do %>
<%= l(:label_csv_file) %>
app/views/glossary/index.html.erb
<div class="contextual">
<%= link_to_if_authorized(l(:label_term_new), {:controller => 'glossary', :action => 'new', :id => @project}, :class => 'icon icon-add') %>
<%= link_to_if_authorized(l(:label_term_new), {:controller => 'glossary', :action => 'new', :project_id => @project}, :class => 'icon icon-add') %>
</div>
<%
......
<% end %>
<% other_formats_links do |f| %>
<%= f.link_to 'CSV' %>
<%= f.link_to 'CSV', :url => params %>
<% end %>
<% else %>
app/views/glossary/move_all.html.erb
<%= simple_format(l(:error_no_movement_project)) %>
</div>
<% else %>
<% form_tag({:id => @project}, :id => 'move_all_form') do %>
<% form_tag({:project_id => @project}, :id => 'move_all_form') do %>
<div class="box tabular">
<p><label for="new_project_id"><%=l(:label_movement_project)%>:</label>
app/views/glossary/new.html.erb
<h2><%=l(:label_term_new)%></h2>
<% labelled_tabular_form_for :term, @term,
<% labelled_tabular_form_for :term, @term,
:url => {:action => 'new', :project_id => @project},
:html => {:multipart => true, :id => 'term-form'} do |f| %>
<%= error_messages_for 'term' %>
<div class="box">
......
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
<%= link_to_remote l(:label_preview),
{ :url => { :controller => 'glossary', :action => 'preview', :id => @project },
{ :url => { :controller => 'glossary', :action => 'preview', :project_id => @project },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('term-form')",
app/views/glossary/show.html.erb
<div class="contextual">
<%= link_to_if_authorized(l(:button_edit), {:controller => 'glossary', :action => 'edit', :id => @project, :term_id => @term}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'glossary', :action => 'destroy', :id => @project, :term_id => @term}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
<%= link_to_if_authorized(l(:button_edit), {:controller => 'glossary', :action => 'edit', :project_id => @project, :id => @term}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'glossary', :action => 'destroy', :project_id => @project, :id => @term}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
</div>
<h2><%= l(:label_term) %> #<%= @term.id %></h2>
......
<p class="author">
<%= authoring @term.created_on, @term.author %>.
<%= updated_by(@term.updated_on, @term.updater) + '.' if @term.created_on != @term.updated_on %>
<% if @term.created_on != @term.updated_on
if (@term.author_id == @term.updater_id) %>
<%= l(:label_updated_time, time_tag(@term.updated_on)).html_safe + '.' %>
<% else %>
<%= updated_by(@term.updated_on, @term.updater) + '.' %>
<% end %>
<% end %>
</p>
</div>
app/views/glossary_styles/_form.html.erb
<% urlopts = {:controller => 'glossary_styles', :action => 'edit',
:id => @project,
:project_id => @project,
:glossary_style_id => @glossary_style.id}
add_search_params(urlopts)
form_for :glossary_style, @glossary_style, :url => urlopts do |f| %>
app/views/glossary_styles/_search.html.erb
<% form_tag({:controller => 'glossary_styles', :action => 'search',
:id => @project},
<% form_tag({:controller => 'glossary_styles', :action => 'search', :project_id => @project},
{:method => 'get', :id=>'search_form'}
) do %>
<%= hidden_field_tag 'project_id', @project.id.to_s %>
<div id="glossary_search" class="hide-when-print">
<fieldset id="filters" class="collapsible <%= (glossary_searching?) ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
app/views/term_categories/destroy.html.erb
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_term_category_reassign_to) %></label>:
<%= select_tag 'reassign_to_id', options_from_collection_for_select(@categories, 'id', 'name') %></p>
<% end %>
<%= hidden_field_tag 'category_id', @category.id %>
<%= hidden_field_tag 'id', @category.id %>
</div>
<%= submit_tag l(:button_apply) %>
<%= link_to l(:button_cancel), :controller => 'term_categories', :action => 'index', :id => @project %>
<%= link_to l(:button_cancel), :controller => 'term_categories', :action => 'index', :project_id => @project %>
<% end %>
<% html_title(l(:glossary_title)) -%>
app/views/term_categories/edit.html.erb
<h2><%=l(:label_term_category)%></h2>
<% labelled_tabular_form_for :category, @category, :url => { :action => 'edit', :id => @project, :category_id => @category } do |f| %>
<% labelled_tabular_form_for :category, @category, :url => { :action => 'edit', :project_id => @project, :id => @category } do |f| %>
<%= render :partial => 'term_categories/form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
app/views/term_categories/index.html.erb
<div class="contextual">
<%= link_to_if_authorized(l(:label_term_category_new), {:controller => 'glossary', :action => 'add_term_category', :id => @project}, :class => 'icon icon-add') %>
<%= link_to_if_authorized(l(:label_term_category_new), {:controller => 'glossary', :action => 'add_term_category', :project_id => @project}, :class => 'icon icon-add') %>
</div>
......
<td><%=h(category.terms.size) %></td>
<td align="center">
<% if authorize_for("term_categories", "edit") %>
<%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:controller => 'term_categories', :action => 'change_order', :id => @project, :category_id => category, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
<%= link_to image_tag('1uparrow.png', :alt => l(:label_sort_higher)), {:controller => 'term_categories', :action => 'change_order', :id => @project, :category_id => category, :position => 'higher'}, :method => :post, :title => l(:label_sort_higher) %> -
<%= link_to image_tag('1downarrow.png', :alt => l(:label_sort_lower)), {:controller => 'term_categories', :action => 'change_order', :id => @project, :category_id => category, :position => 'lower'}, :method => :post, :title => l(:label_sort_lower) %>
<%= link_to image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), {:controller => 'term_categories', :action => 'change_order', :id => @project, :category_id => category, :position => 'lowest'}, :method => :post, :title => l(:label_sort_lowest) %>
<%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:controller => 'term_categories', :action => 'change_order', :project_id => @project, :id => category, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
<%= link_to image_tag('1uparrow.png', :alt => l(:label_sort_higher)), {:controller => 'term_categories', :action => 'change_order', :project_id => @project, :id => category, :position => 'higher'}, :method => :post, :title => l(:label_sort_higher) %> -
<%= link_to image_tag('1downarrow.png', :alt => l(:label_sort_lower)), {:controller => 'term_categories', :action => 'change_order', :project_id => @project, :id => category, :position => 'lower'}, :method => :post, :title => l(:label_sort_lower) %>
<%= link_to image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), {:controller => 'term_categories', :action => 'change_order', :project_id => @project, :id => category, :position => 'lowest'}, :method => :post, :title => l(:label_sort_lowest) %>
<% end %>
</td>
<td align="right">
<%= link_to_if_authorized(image_tag('edit.png'), { :action => 'edit', :id => @project, :category_id => category }, :title => l(:button_edit)) %>
<%= link_to_if_authorized(image_tag('delete.png'), {:action => 'destroy', :id => @project, :category_id => category}, :method => :post, :title => l(:button_delete)) %></td>
<%= link_to_if_authorized(image_tag('edit.png'), { :action => 'edit', :project_id => @project, :id => category }, :title => l(:button_edit)) %>
<%= link_to_if_authorized(image_tag('delete.png'), {:action => 'destroy', :project_id => @project, :id => category}, :method => :post, :title => l(:button_delete)) %></td>
</tr>
<% end %>
<% end %>
config/locales/de.yml
error_term_not_found_name: "\"%s\": Keinen Begriff mit diesem Namen gefunden."
error_term_not_found_name_project: "\"%s\": Keinen Begriff mit diesem Namen im Projekt \"%s\" gefunden."
error_project_not_found: "\"%s\": Kein Projekt unter diesem Namen gefunden."
error_to_number: Ung?ltige Zahl. --- %s
error_to_number: Ungltige Zahl. --- %s
error_csv_import_row: " Zeile : %d"
error_import_no_name: "\"%s\" ist unbekannt."
config/locales/en.yml
index_ary: []
index_subary: []
in_encoding_candidates: []
in_encoding_candidates: []
config/locales/pt.yml
# Colocar aqui as cadeias de caracteres para o i18n do Rails
pt:
project_module_glossary: Glossário
permission_view_terms: Ver Glossário
permission_manage_terms: Gerir Glossário
permission_manage_term_categories: Gerir Categoria dos Termos
glossary_title: Glossário
label:
id: N.º
name: Termo
name_en: Inglês
category: Categoria
datatype: "Tipo de dados a usar no código"
codename: "Abreviatura a usar no código"
description: Descrição
rubi: Ruby
abbr_whole: Palavra completa correspondente à abreviatura
label_updater: Actualizador
label_term_plural: Glossário
label_manage: Gerir
label_manage_term_category: Gerir categoria
label_not_categorized: Por categorizar
label_view: Ver
label_style: Estilo
label_term: Termo
label_term_new: Novo termo
label_index: Vista em lista
label_grouping: Agrupamento
label_glossary_style_show_desc: Mostrar descrições
label_glossary_style_all_project: Todos os projectos
label_glossary_style_project_current: Corrente
label_glossary_style_project_mine: Meus
label_glossary_style_project_all: Todos
label_latest: Últimos
label_indays: Dias
label_glossary_style_index: Índice
label_import: Importar
label_glossary_import_csv: Importar de CSV
label_csv_file: Ficheiro CSV
label_csv_import_is_first_comment: A primeira linha é um comentário?
label_import_items: Importar itens
label_item: Item
label_column: Coluna
message_import_item: Para o projecto, criador, etc., usa-se o valor corrente.
label_csv_import_finished: Importação de CSV terminada
error_import_failed: Importação de ficheiro falhou.
label_create_category_num: Número de categorias criadas
label_create_term_num: Número de termos criados
label_update_term_num: Número de termos actualizados
label_file_encoding: Codificação do ficheiro
label_movement_project: Movimentações no projecto
label_move_all_terms: Mover todos os termos
label_term_category: Categoria do termo
label_term_category_new: Nova categoria
field_term_counts_under_category: Contagem de termos
text_term_category_destroy_question: Há um termo ({{value}}) com esta categoria. Que deseja que se faça?
text_term_category_destroy_assignments: Remover atribuição à categoria
text_term_category_reassign_to: Atribuir termo a esta categoria
label_hide_item: Preferências de atributos escondidos
label_tag_termlink: Ligação a um item
notice_glossary_style_create_f: Criação de dados de Estilo de Glossário falhou
error_term_macro_arg: "A macro \"term\" precisa de argumentos, 1 ou 2."
error_termno_macro_arg: "A macro \"termno\" precisa de exactamente 1 argumento."
error_term_not_found_id: "\"%s\": Não há termos com esse n.º."
error_term_not_found_name: "\"%s\": Não há termos com esse nome."
error_term_not_found_name_project: "\"%s\": Não há termos com esse nome no projecto \"%s\"."
error_project_not_found: "\"%s\": Não há qualquer projecto com esse identificador."
error_to_number: A conversão em número falhou. --- %s
error_csv_import_row: " linha : %d"
error_import_no_name: "\"%s\" não está descrito."
error_create_term_category: Criação de Categoria de Termo falhou.
error_create_term: Criação de Termo falhou.
error_file_none: Faltou especificar o Ficheiro.
error_no_movement_project: Projecto para o qual mover o termo não existe.
index_ary_en_sep_cnt: 6
index_ary_en: [A, B, C, D, E, F,
G, H, I, J, K, L,
M, N, O, P, Q, R,
S, T, U, V, W, X,
Y, Z]
index_ary_sep_cnt: 0
index_ary: []
index_subary: []
in_encoding_candidates: []
config/routes.rb
ActionController::Routing::Routes.draw do |map|
map.connect 'glossary_styles/:action', :controller => 'glossary_styles'
map.with_options :controller => 'glossary' do |submap|
submap.connect 'projects/:project_id/glossary', :action => 'index'
submap.connect 'projects/:project_id/glossary/new', :action => 'new'
submap.connect 'projects/:project_id/glossary/:id', :action => 'show', :id => /\d+/
submap.connect 'projects/:project_id/glossary/:action'
submap.connect 'projects/:project_id/glossary/:id/:action', :id => /\d+/
end
map.with_options :controller => 'term_categories' do |submap|
submap.connect 'projects/:project_id/term_categories', :action => 'index'
submap.connect 'projects/:project_id/term_categories/:action'
submap.connect 'projects/:project_id/term_categories/:id/:action', :id => /\d+/
end
end
db/migrate/20110116171358_create_glossary_styles.rb
class CreateGlossaryStyles < ActiveRecord::Migration
def self.up
create_table :glossary_styles do |t|
t.column :show_desc, :boolean, :default => false
t.column :groupby, :integer, :default => 1
t.column :project_scope, :integer, :default => 0
t.column :sort_item_0, :string, :default => ''
t.column :sort_item_1, :string, :default => ''
t.column :sort_item_2, :string, :default => ''
t.column :user_id, :integer, :default => 0
end
add_column :terms, :rubi, :string, :default => ''
add_column :terms, :abbr_whole, :string, :default => ''
end
def self.down
drop_table :glossary_styles
remove_column :terms, :abbr_whole
remove_column :terms, :rubi
end
end
init.rb
Redmine::Plugin.register :redmine_glossary do
name 'Redmine Glossary Plugin'
author 'M. Yoshida'
description "This is a fork of M. Yoshida Redmine plugin. It is used to create a glossary which is is a list of terms in a project"
version '0.6.2'
description "This is a Redmine plugin to create a glossary which is is a list of terms in a project"
version '0.7.0'
author_url 'http://yohshiy.blog.fc2.com/'
url 'http://www.r-labs.org/projects/rp-glossary/wiki/GlossaryEn'
......
menu(:project_menu, :glossary,
{ :controller => 'glossary', :action => 'index' },
:caption => :glossary_title)
:caption => :glossary_title, :param => :project_id)
end
......
term = nil
case sargs.size
when 1
proj = Project.find_by_identifier(params[:id])
proj = Project.find_by_identifier(params[:project_id]) unless proj
proj = Project.find_by_identifier(params[:project_id])
term = Term.find_for_macro(sargs[0], proj, true)
when 2
proj = Project.find_by_identifier(sargs[1])
lib/term_link_helper.rb
def term_link_new(name, proj)
link_to(name + '?',
{:controller => 'glossary', :action => 'new', :id => proj,
{:controller => 'glossary', :action => 'new', :project_id => proj,
:new_term_name => CGI::escapeHTML(name)},
{:class=>'new'})
end
def term_link(term)
str = link_to(term.name, :controller => 'glossary', :action => 'show', :id => term.project,
:term_id => term)
str = link_to(term.name, :controller => 'glossary', :action => 'show',
:project_id => term.project, :id => term.id)
unless (term.abbr_whole.empty?)
str = content_tag(:abbr, str, :title=>term.abbr_whole)
end
release_note.rwiki
h1. �����[�X�m�[�g
h2. 0.6.2 - Martin Denizet's fork
Feature
* Add French, Chinese and Technical English fields.
h1. リリースノート
h2. 0.6.1
�@�\�lj�
* �p��ƃJ�e�S���̃e�[�u���ŁA �ҏW�ƍ폜�̃����N���A�C�R�������ŕ\��
�s��C��
* �J�e�S���ł̃t�B���^�����O�ŁA�J�e�S�����ɐ��K�\���̓��ꕶ�����܂�ł���Ƃ��̃G���[���C��
機能追加
* 用語とカテゴリのテーブルで、 編集と削除のリンクをアイコンだけで表示
不具合修正
* カテゴリでのフィルタリングで、カテゴリ名に正規表現の特殊文字を含んでいるときのエラーを修正
---
......
h2. 0.6.0
�@�\�lj�
# �v���W�F�N�g�̗p����ꊇ�ړ�
# �p��̈ꗗ�\���ɐ����̈ꕔ��\��
# �C���f�b�N�X�����̉����̉��
# ���b�Z�[�W�t�@�C���̒lj�
## �h�C�c�� (de)
## �ȈՒ����� (zh)
�s��C��
# �v���W�F�N�g�̑I��
# �J�e�S���ɂ��t�B���^�[
# �J�e�S���Ȃ��̏ꍇ�̗p��W�� CSV �̏o��
# rake �ɂ��f�[�^�x�[�X�X�V
# �p��W����ȊO�� term Wiki �}�N���̗��p
# & ���܂񂾗p��� term �}�N��
# �t���K�i�A�W�J���̂̔�\���ݒ�
機能追加
# プロジェクトの用語を一括移動
# 用語の一覧表示に説明の一部を表示
# インデックス検索の解除の改良
# メッセージファイルの追加
## ドイツ語 (de)
## 簡易中国語 (zh)
不具合修正
# プロジェクトの選択
# カテゴリによるフィルター
# カテゴリなしの場合の用語集を CSV の出力
# rake によるデータベース更新
# 用語集から以外の term Wiki マクロの利用
# & を含んだ用語の term マクロ
# フリガナ、展開名称の非表示設定
---
......
# The Wiki term macro error in wiki page except glossary page
# The Wiki term macro error of terms which have & caractor.
# Hiden settings of rubi and abbrev.
h2. 0.6.0
機能追加
# Redmine 1.4.0 対応
---
Feature
# support for Redmine 1.4 対応

他の形式にエクスポート: Unified diff