From bd2ba2fcb0c893102f0624dc616baa61096c8c2e Mon Sep 17 00:00:00 2001 From: Netto Date: Tue, 16 Jun 2015 10:34:04 -0300 Subject: [PATCH 01/27] Create 20150616103300_change_column_article_to_long_text.rb Increasing the size of articles to LONGTEXT --- .../20150616103300_change_column_article_to_long_text.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 db/migrate/20150616103300_change_column_article_to_long_text.rb diff --git a/db/migrate/20150616103300_change_column_article_to_long_text.rb b/db/migrate/20150616103300_change_column_article_to_long_text.rb new file mode 100644 index 0000000..17ae1a2 --- /dev/null +++ b/db/migrate/20150616103300_change_column_article_to_long_text.rb @@ -0,0 +1,6 @@ +class ChangeColumnArticleToLongText < ActiveRecord::Migration + def self.up + change_column :kb_articles, :content, :text, :limit => 16.megabytes + 3 + end + +end From 0cb278374debe9a67c3de45bdbad60fdcd6a6f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20K=C3=A4mpfe?= Date: Fri, 16 Oct 2015 15:50:24 +0200 Subject: [PATCH 02/27] adjusted acts_as modules to work with redmine version 3.1 --- app/models/kb_article.rb | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/app/models/kb_article.rb b/app/models/kb_article.rb index 5d09caa..0e0043a 100644 --- a/app/models/kb_article.rb +++ b/app/models/kb_article.rb @@ -25,21 +25,34 @@ class KbArticle < ActiveRecord::Base acts_as_versioned :if_changed => [:title, :content, :summary] self.non_versioned_columns << 'comments_count' - acts_as_searchable :columns => [ "#{table_name}.title", "#{table_name}.content"], - :include => [ :project ], - :order_column => "#{table_name}.id", - :date_column => "#{table_name}.created_at" - acts_as_event :title => Proc.new {|o| status = (o.new_status ? "(#{l(:label_new_article)})" : nil ); "#{status} #{l(:label_title_articles)} ##{o.id} - #{o.title}" }, :description => :content, :datetime => :updated_at, :type => Proc.new { |o| 'article-' + (o.new_status ? 'add' : 'edit') }, :url => Proc.new { |o| {:controller => 'articles', :action => 'show', :id => o.id, :project_id => o.project} } - acts_as_activity_provider :find_options => {:include => :project}, - :author_key => :author_id, - :type => 'kb_articles', - :timestamp => :updated_at + # Redmine 3.1.X + if ActiveRecord::VERSION::MAJOR >= 4 + acts_as_activity_provider :scope => joins(:project), + :permission => :view_kb_articles, + :author_key => :author_id, + :type => 'kb_articles', + :timestamp => :updated_at + + acts_as_searchable :columns => [ "#{table_name}.title", "#{table_name}.content"], + :preload => [ :project ], + :date_column => "#{table_name}.created_at" + else + acts_as_activity_provider :find_options => {:include => :project}, + :author_key => :author_id, + :type => 'kb_articles', + :timestamp => :updated_at + + acts_as_searchable :columns => [ "#{table_name}.title", "#{table_name}.content"], + :include => [ :project ], + :order_column => "#{table_name}.id", + :date_column => "#{table_name}.created_at" + end has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on" From 1d45811396e61fda00ba50b72860e2ac6cdbcb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20K=C3=A4mpfe?= Date: Fri, 16 Oct 2015 17:22:06 +0200 Subject: [PATCH 03/27] finders and watchers --- app/controllers/articles_controller.rb | 8 ++++---- app/controllers/categories_controller.rb | 2 +- app/views/articles/show.html.erb | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 25c2383..311022c 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -33,7 +33,7 @@ def index def new @article = KbArticle.new - @categories = @project.categories.find(:all) + @categories = @project.categories.all @default_category = params[:category_id] @article.category_id = params[:category_id] @article.version = params[:version] @@ -69,7 +69,7 @@ def create def show @article.view request.remote_ip, User.current - @attachments = @article.attachments.find(:all).sort_by(&:created_on) + @attachments = @article.attachments.all.sort_by(&:created_on) @comments = @article.comments @versions = @article.versions.select("id, author_id, version_comments, updated_at, version").order('version DESC') @@ -81,7 +81,7 @@ def show end def edit - @categories=@project.categories.find(:all) + @categories=@project.categories.all # don't keep previous comment @article.version_comments = nil @article.version = params[:version] @@ -90,7 +90,7 @@ def edit def update @article.updater_id = User.current.id params[:article][:category_id] = params[:category_id] - @categories = @project.categories.find(:all) + @categories = @project.categories.all # don't keep previous comment @article.version_comments = nil @article.version_comments = params[:article][:version_comments] diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 9bd1f56..f3a7ad7 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -26,7 +26,7 @@ def show def new @category = KbCategory.new @parent_id = params[:parent_id] - @categories=@project.categories.find(:all) + @categories=@project.categories.all end def create diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index cf090b8..0c7dd78 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -15,7 +15,9 @@
  • <%= link_to_if_authorized l(:label_edit_article), { :controller => 'articles', :action => 'edit', :id => @article.id, :project_id => @project}, :class => 'icon icon-edit' %>
  • <%= link_to_if_authorized l(:label_delete_article), { :controller => 'articles', :action => 'destroy', :id => @article.id, :project_id => @project}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
  • <%= link_to_if_authorized l(:label_new_comment), { :controller => "articles", :action => "comment", :article_id => @article.id, :project_id => @project}, :class => "icon icon-comment", :remote => true, :method => :get %>
  • -
  • <%= watcher_tag(@article, User.current) %>
  • +
  • + <%= render :partial => 'watchers/watchers', :locals => {:watched => @article} %> +

  • From 06d188599fd6fbba8ee7565677c41141310acc19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20K=C3=A4mpfe?= Date: Fri, 16 Oct 2015 17:24:55 +0200 Subject: [PATCH 04/27] watchers on the view for categories --- app/views/categories/show.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb index 5eeefdf..fc554a1 100644 --- a/app/views/categories/show.html.erb +++ b/app/views/categories/show.html.erb @@ -19,8 +19,9 @@
  • <%= link_to_if_authorized l(:label_new_article), { :controller => 'articles', :action => 'new', :category_id => @category.id, :project_id => @project}, :class => 'icon icon-add' %>
  • <%= link_to_if_authorized l(:label_new_category), { :controller => 'categories', :action => 'new', :parent_id => @category.id, :project_id => @project}, :class => 'icon icon-add' %>
  • <%= link_to_if_authorized l(:label_edit_category), { :controller => 'categories', :action => 'edit', :id => @category.id, :project_id => @project}, :class => 'icon icon-edit' %>
  • -
  • <%= link_to_if_authorized l(:label_delete_category), { :controller => 'categories', :action => 'destroy', :id => @category.id, :project_id => @project}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
  • -
  • <%= watcher_tag(@category, User.current) %>
  • +
  • <%= link_to_if_authorized l(:label_delete_category), { :controller => 'categories', :action => 'destroy', :id => @category.id, :project_id => @project}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
  • + <%= render :partial => 'watchers/watchers', :locals => {:watched => @category} %> +
  • <%= l(:title_browse_by_category) %>

    <%= render :partial => "categories/tree" %> From 46411faafa2a2b6ad89d105e337540d8972690a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20K=C3=A4mpfe?= Date: Fri, 16 Oct 2015 17:42:59 +0200 Subject: [PATCH 05/27] finders for the remaining actions --- app/controllers/articles_controller.rb | 2 +- app/controllers/categories_controller.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 311022c..310539b 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -54,7 +54,7 @@ def create @article.category_id = params[:category_id] @article.author_id = User.current.id @article.project_id = KbCategory.find(params[:category_id]).project_id - @categories = @project.categories.find(:all) + @categories = @project.categories.all # don't keep previous comment @article.version_comments = params[:article][:version_comments] if @article.save diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index f3a7ad7..450f740 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -49,11 +49,11 @@ def create def edit @parent_id = @category.parent_id - @categories=@project.categories.find(:all) + @categories=@project.categories.all end def destroy - @categories=@project.categories.find(:all) + @categories=@project.categories.all if @category.articles.size == 0 @category.destroy flash[:notice] = l(:label_category_deleted) From a7a53316f0aa0d5ddca546a85eecaeb96800a53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20K=C3=A4mpfe?= Date: Fri, 16 Oct 2015 17:52:16 +0200 Subject: [PATCH 06/27] preview is now patch, not put --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 7bc7083..8b5af3a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,7 +12,7 @@ get "comment" member do - put "preview" + patch "preview" post "add_comment" post "destroy_comment" post "rate" From fff4e7dce227bb98f999f845163b6c49b27b029f Mon Sep 17 00:00:00 2001 From: barbiedrummer Date: Sat, 20 Feb 2016 14:36:16 +0300 Subject: [PATCH 07/27] Fix for error #317 --- config/locales/ru.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 2219ed5..b61aef1 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -52,6 +52,7 @@ ru: label_summary_toprated_articles: one: "Рейтинг: %{rating_avg}/%{rating_max} после одного голоса" other: "Рейтинг: %{rating_avg}/%{rating_max} после %{count} голосов" + zero: "Голосов нет" label_summary_updated_articles: "Обновлено %{ago}" label_title: Заголовок label_title_articles: Статьи From 30814d472c62630a04ea1b08934c14bc2831b9e1 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Sun, 27 Dec 2015 12:25:43 -0800 Subject: [PATCH 08/27] Added more options to plugin so that it can work better for other types of content Conflicts: app/models/kb_article.rb app/views/articles/show.html.erb --- AUTHORS | 1 + app/helpers/knowledgebase_helper.rb | 44 ++++++++++++++----- app/models/kb_article.rb | 6 +-- app/views/articles/_form.html.erb | 11 ++++- app/views/articles/_list.html.erb | 43 +++++++++++++++--- app/views/articles/_list_table.html.erb | 16 +++++++ app/views/articles/_thumbnail.html.erb | 9 ++++ .../articles/sections/_attachments.html.erb | 7 ++- app/views/articles/show.html.erb | 31 ++++++++++++- .../_knowledgebase_settings.html.erb | 23 +++++++++- assets/stylesheets/knowledgebase.css | 2 +- config/locales/en.yml | 6 +++ 12 files changed, 175 insertions(+), 24 deletions(-) create mode 100644 app/views/articles/_thumbnail.html.erb diff --git a/AUTHORS b/AUTHORS index f9de3e0..52f4ae7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,6 +21,7 @@ Contributors: * Daniel Felix * Messinger * xarlie +* Rob Spearman Documentation: * Alan Bowman diff --git a/app/helpers/knowledgebase_helper.rb b/app/helpers/knowledgebase_helper.rb index e24b1c1..7bd7460 100644 --- a/app/helpers/knowledgebase_helper.rb +++ b/app/helpers/knowledgebase_helper.rb @@ -5,7 +5,8 @@ module KnowledgebaseHelper def format_article_summary(article, format, options = {}) output = case format when "normal" - truncate article.summary, :length => options[:truncate] + "" + #truncate article.summary, :length => options[:truncate] when "newest" l(:label_summary_newest_articles, :ago => time_ago_in_words(article.created_at), @@ -19,15 +20,24 @@ def format_article_summary(article, format, options = {}) :count => article.view_count, :created => article.created_at.to_date.to_formatted_s(:rfc822)) when "toprated" - l(:label_summary_toprated_articles, - :rating_avg => article.rating_average.to_s, - :rating_max => "5", - :count => article.rated_count) + if article.rating_average.to_i == 0 + l(:label_unrated_article) + else + l(:label_summary_toprated_articles, + :rating_avg => article.rating_average.to_s, + :rating_max => "5", + :count => article.rated_count) + end else nil end - content_tag(:div, raw(output), :class => "summary") + sum = "" + unless redmine_knowledgebase_settings_value(:disable_article_summaries) + sum = "

    " + (truncate article.summary, :length => options[:truncate]) + "

    " + end + + content_tag(:div, raw(sum + output), :class => "summary") end def sort_categories? @@ -94,11 +104,23 @@ def write_article(pdf, article) end def article_tabs - tabs = [{:name => 'content', :action => :content, :partial => 'articles/sections/content', :label => :label_content}, - {:name => 'comments', :action => :comments, :partial => 'articles/sections/comments', :label => :label_comment_plural}, - {:name => 'attachments', :action => :attachments, :partial => 'articles/sections/attachments', :label => :label_attachment_plural}, - {:name => 'history', :action => :history, :partial => 'articles/sections/history', :label => :label_history} - ] + + unless redmine_knowledgebase_settings_value(:show_attachments_first) + + tabs = [{:name => 'content', :action => :content, :partial => 'articles/sections/content', :label => :label_content}, + {:name => 'comments', :action => :comments, :partial => 'articles/sections/comments', :label => :label_comment_plural}, + {:name => 'attachments', :action => :attachments, :partial => 'articles/sections/attachments', :label => :label_attachment_plural}, + {:name => 'history', :action => :history, :partial => 'articles/sections/history', :label => :label_history} + ] + + else + tabs = [ {:name => 'attachments', :action => :attachments, :partial => 'articles/sections/attachments', :label => :label_attachment_plural}, + {:name => 'content', :action => :content, :partial => 'articles/sections/content', :label => :label_content}, + {:name => 'comments', :action => :comments, :partial => 'articles/sections/comments', :label => :label_comment_plural}, + {:name => 'history', :action => :history, :partial => 'articles/sections/history', :label => :label_history} + ] + end + # TODO permissions? # tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)} end diff --git a/app/models/kb_article.rb b/app/models/kb_article.rb index fb58255..cd89469 100644 --- a/app/models/kb_article.rb +++ b/app/models/kb_article.rb @@ -39,7 +39,7 @@ class KbArticle < ActiveRecord::Base :type => 'kb_articles', :timestamp => :updated_at - acts_as_searchable :columns => [ "#{table_name}.title", "#{table_name}.content"], + acts_as_searchable :columns => [ "#{table_name}.title", "#{table_name}.summary", "#{table_name}.content"], :preload => [ :project ], :date_column => "#{table_name}.created_at" else @@ -48,7 +48,7 @@ class KbArticle < ActiveRecord::Base :type => 'kb_articles', :timestamp => :updated_at - acts_as_searchable :columns => [ "#{table_name}.title", "#{table_name}.content"], + acts_as_searchable :columns => [ "#{table_name}.title", "#{table_name}.summary", "#{table_name}.content"], :include => [ :project ], :order_column => "#{table_name}.id", :date_column => "#{table_name}.created_at" @@ -139,4 +139,4 @@ def initialize(content_to, content_from) @content_from = content_from super(content_to.content, content_from.content) end -end \ No newline at end of file +end diff --git a/app/views/articles/_form.html.erb b/app/views/articles/_form.html.erb index 9f181ff..ccd54d0 100644 --- a/app/views/articles/_form.html.erb +++ b/app/views/articles/_form.html.erb @@ -14,8 +14,17 @@

    <%= f.text_field :tag_list, :size => 80 %>

    <%= f.text_field :version_comments, :size => 120, :label => l(:field_version_comments) %>

    + +<% if @article.attachments.exists? %> +
    +

    + <%= render :partial => "articles/sections/attachments" %> +

    +
    +<% end %> +
    -

    <%= render :partial => 'attachments/form' %>

    +

    <%= render :partial => 'attachments/form' %>

    <%= wikitoolbar_for 'article_content' %> diff --git a/app/views/articles/_list.html.erb b/app/views/articles/_list.html.erb index bc9a596..6a7ecb2 100644 --- a/app/views/articles/_list.html.erb +++ b/app/views/articles/_list.html.erb @@ -1,7 +1,40 @@ <% articles.each do |article| %> -
    - <% truncate_length = 100 if local_assigns[:truncate_length].nil? %> - <%= link_to truncate(article.title, :length => truncate_length), { :controller => 'articles', :action => 'show', :id => article.id, :project_id => @project}, :title => article.title %> - <%= format_article_summary(article, summary_format, :truncate => truncate_length ) %> -
    + + <% category = "category" + allcats = "" + article.category.ancestors.each do |ancestor| + category = category + "-" + ancestor.title.gsub(/\s+/, "_") + allcats = allcats + " " + category + end + category = category + "-" + article.category.title.gsub(/\s+/, "_") + allcats = allcats + " " + category + %> + +
    + + <% truncate_length = 100 if local_assigns[:truncate_length].nil? %> + <%= link_to truncate(article.title, :length => truncate_length), { :controller => 'articles', :action => 'show', :id => article.id, :project_id => @project}, :title => article.title %> + + <% if redmine_knowledgebase_settings_value(:show_breadcrumbs_for_article_lists) %> + + <% end %> + + + <%= format_article_summary(article, summary_format, :truncate => truncate_length ) %> + + + <% if redmine_knowledgebase_settings_value(:show_thumbnails_for_articles) %> +
    + <%= render :partial => "articles/thumbnail", :locals => { :article => article, :imgclass => 'thumbnail-list', :project_id => @project } %> +
    + <% end %> + +
    <% end %> diff --git a/app/views/articles/_list_table.html.erb b/app/views/articles/_list_table.html.erb index 0e12d4a..92b57d2 100644 --- a/app/views/articles/_list_table.html.erb +++ b/app/views/articles/_list_table.html.erb @@ -2,7 +2,12 @@ + <% if redmine_knowledgebase_settings_value(:show_thumbnails_for_articles) %> + + <% end %> + + @@ -10,6 +15,13 @@ <% articles.each do |article| %> + + <% if redmine_knowledgebase_settings_value(:show_thumbnails_for_articles) %> + + <% end %> + + + + @@ -29,3 +44,4 @@
    <%= "Thumbnail" %><%= sortable "title" %><%= "Rating" %><%= sortable "author_id", "Author" %> <%= sortable "created_at", "Created" %> <%= sortable "updated_at", "Updated" %>
    + <%= render :partial => "articles/thumbnail", :locals => { :article => article, :imgclass => 'thumbnail-table', :project_id => @project } %> + <%= link_to article.title, { :controller => 'articles', :action => 'show', @@ -22,6 +34,9 @@ <% end %> <% rating = article.rating_average.to_i %><%= rating != 0 ? "#{rating} / 5" : "-" %><%= (link_to_user(article.author)).html_safe %> <%= time_ago_in_words article.created_at %> ago <%= time_ago_in_words article.updated_at %> ago
    + diff --git a/app/views/articles/_thumbnail.html.erb b/app/views/articles/_thumbnail.html.erb new file mode 100644 index 0000000..259879a --- /dev/null +++ b/app/views/articles/_thumbnail.html.erb @@ -0,0 +1,9 @@ + + +<% article.attachments.each do |attach| %> + <% if attach.thumbnailable? %> + + <%= link_to raw(""), { :controller => 'articles', :action => 'show', :id => article.id, :project_id => project_id}, :title => article.title %> + <% break %> + <% end %> +<% end %> diff --git a/app/views/articles/sections/_attachments.html.erb b/app/views/articles/sections/_attachments.html.erb index 64ecbf0..a860886 100644 --- a/app/views/articles/sections/_attachments.html.erb +++ b/app/views/articles/sections/_attachments.html.erb @@ -1 +1,6 @@ -<%= render :partial => 'attachments/links', :locals => {:attachments => @article.attachments, :options => { :deletable => User.current.logged? } } %> + +<%= link_to_attachments @article, +:thumbnails => true, +:author => false %> + + diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 0c7dd78..9bd9de1 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -53,4 +53,33 @@ <%= f.link_to 'PDF', :url => params %> <% end %> -<%= render_tabs article_tabs %> \ No newline at end of file +<% unless redmine_knowledgebase_settings_value(:show_article_without_tabs) %> + <%= render_tabs article_tabs %> + +<% else %> + +
    + + <% if redmine_knowledgebase_settings_value(:show_attachments_first) %> +

    <%= l(:label_attachment_plural) %>

    + <%= render :partial => "articles/sections/attachments" %> +
    + <% end %> + +

    <%= l(:label_description) %>

    + <%= render :partial => "articles/sections/content" %> +
    +

    <%= l(:label_comment_plural) %>

    + <%= render :partial => "articles/sections/comments" %> +
    + + <% unless redmine_knowledgebase_settings_value(:show_attachments_first) %> +

    <%= l(:label_attachment_plural) %>

    + <%= render :partial => "articles/sections/attachments" %> +
    + <% end %> + +

    <%= l(:label_history) %>

    + <%= render :partial => "articles/sections/history" %> + +<% end %> diff --git a/app/views/redmine_knowledgebase/_knowledgebase_settings.html.erb b/app/views/redmine_knowledgebase/_knowledgebase_settings.html.erb index 17dc632..742f3aa 100644 --- a/app/views/redmine_knowledgebase/_knowledgebase_settings.html.erb +++ b/app/views/redmine_knowledgebase/_knowledgebase_settings.html.erb @@ -14,4 +14,25 @@ <%= label_tag :settings_disable_article_summaries, l(:disable_article_summaries) %> <%= check_box_tag 'settings[disable_article_summaries]', 1, @settings[:disable_article_summaries] %> <%= redmine_knowledgebase_count_article_summaries rescue I18n.t(:message_summary_count_not_available) %> -

    \ No newline at end of file +

    + +

    + <%= label_tag :settings_show_article_without_tabs, l(:show_article_without_tabs) %> + <%= check_box_tag 'settings[show_article_without_tabs]', 1, @settings[:show_article_without_tabs] %> +

    + +

    + <%= label_tag :settings_show_attachments_first, l(:show_attachments_first) %> + <%= check_box_tag 'settings[show_attachments_first]', 1, @settings[:show_attachments_first] %> +

    + +

    + <%= label_tag :settings_show_thumbnails_for_articles, l(:show_thumbnails_for_articles) %> + <%= check_box_tag 'settings[show_thumbnails_for_articles]', 1, @settings[:show_thumbnails_for_articles] %> +

    + +

    + <%= label_tag :settings_show_breadcrumbs_for_article_lists, l(:show_breadcrumbs_for_article_lists) %> + <%= check_box_tag 'settings[show_breadcrumbs_for_article_lists]', 1, @settings[:show_breadcrumbs_for_article_lists] %> +

    + diff --git a/assets/stylesheets/knowledgebase.css b/assets/stylesheets/knowledgebase.css index bf93b43..1e5a063 100644 --- a/assets/stylesheets/knowledgebase.css +++ b/assets/stylesheets/knowledgebase.css @@ -91,7 +91,7 @@ h3.cattitle { #taglist ul { font-family: "Courier"; font-size: 10px; line-height: 2em; } #taglist li { margin-left: -40px; list-style-type: none; margin-bottom: 10px; } -#taglist a { color:#060; background-color:#E1FFD1; border:solid 1px #C5F8AC; -moz-border-radius: 5px; -webkit-border-radius: 5px; padding: 3px; border-radius: 5px; } +#taglist a { color:#060; background-color:#E1FFD1; border:solid 1px #C5F8AC; -moz-border-radius: 5px; -webkit-border-radius: 5px; padding: 3px; border-radius: 5px; white-space: nowrap; line-height: 2em; } #taglist a:hover { text-decoration:underline;} .tag-x-small { font-size: 80%; } diff --git a/config/locales/en.yml b/config/locales/en.yml index ab2b6bd..367d440 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -19,6 +19,7 @@ en: label_article_viewed: one: "Viewed once" other: "Viewed %{count} times" + label_attachment_add: "Add files" label_category: Category label_category_created: "Created category '%{title}'" label_category_deleted: "Category deleted" @@ -57,6 +58,7 @@ en: label_title_articles: Article label_title_category: Category label_updated_who: "Updated by %{updater} %{age} ago" + label_unrated_article: "Unrated" message_no_articles: "No articles have been added yet. Click Create Article to get started." message_no_categories: "No categories have been created. Click Create Category to get started." message_no_permissions: "You do not have permission to view any articles or categories. Please contact your administrator." @@ -79,6 +81,10 @@ en: permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase show_category_totals: "Show category totals in tree?" + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Knowledgebase summary page article limit" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current From e50ccc1bc7b8945502248d5c4d2d5635ba405d97 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Mon, 28 Dec 2015 09:22:21 -0800 Subject: [PATCH 09/27] Article history will only show up if have view permission. --- app/helpers/knowledgebase_helper.rb | 26 +++++++++++-------- app/views/articles/sections/_history.html.erb | 8 ++++-- app/views/articles/show.html.erb | 6 +++-- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/app/helpers/knowledgebase_helper.rb b/app/helpers/knowledgebase_helper.rb index 7bd7460..a5a7dc3 100644 --- a/app/helpers/knowledgebase_helper.rb +++ b/app/helpers/knowledgebase_helper.rb @@ -105,24 +105,28 @@ def write_article(pdf, article) def article_tabs + content = {:name => 'content', :action => :content, :partial => 'articles/sections/content', :label => :label_content} + comments = {:name => 'comments', :action => :comments, :partial => 'articles/sections/comments', :label => :label_comment_plural} + attachments = {:name => 'attachments', :action => :attachments, :partial => 'articles/sections/attachments', :label => :label_attachment_plural} + history = {:name => 'history', :action => :history, :partial => 'articles/sections/history', :label => :label_history} + unless redmine_knowledgebase_settings_value(:show_attachments_first) - tabs = [{:name => 'content', :action => :content, :partial => 'articles/sections/content', :label => :label_content}, - {:name => 'comments', :action => :comments, :partial => 'articles/sections/comments', :label => :label_comment_plural}, - {:name => 'attachments', :action => :attachments, :partial => 'articles/sections/attachments', :label => :label_attachment_plural}, - {:name => 'history', :action => :history, :partial => 'articles/sections/history', :label => :label_history} - ] - + tabs = [content, comments, attachments, history] else - tabs = [ {:name => 'attachments', :action => :attachments, :partial => 'articles/sections/attachments', :label => :label_attachment_plural}, - {:name => 'content', :action => :content, :partial => 'articles/sections/content', :label => :label_content}, - {:name => 'comments', :action => :comments, :partial => 'articles/sections/comments', :label => :label_comment_plural}, - {:name => 'history', :action => :history, :partial => 'articles/sections/history', :label => :label_history} - ] + + tabs = [attachments, content, comments, history] + end + + # Do not show History if no permission + unless User.current.allowed_to?(:view_article_history, @project) + tabs.pop(1) end # TODO permissions? # tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)} + + return tabs end def create_preview_link diff --git a/app/views/articles/sections/_history.html.erb b/app/views/articles/sections/_history.html.erb index 41b9bb3..3fb0230 100644 --- a/app/views/articles/sections/_history.html.erb +++ b/app/views/articles/sections/_history.html.erb @@ -1,3 +1,7 @@ -<% unless @article.versions.size == 0 %> - <%= render :partial => 'articles/history', :locals => {:article_id => @article, :project_id => @project } %> +<% if User.current.allowed_to?(:view_article_history, @project) %> + + <% unless @article.versions.size == 0 %> + <%= render :partial => 'articles/history', :locals => {:article_id => @article, :project_id => @project } %> + <% end %> + <% end %> diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 9bd9de1..fe8c64b 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -79,7 +79,9 @@
    <% end %> -

    <%= l(:label_history) %>

    - <%= render :partial => "articles/sections/history" %> + <% if User.current.allowed_to?(:view_article_history, @project) %> +

    <%= l(:label_history) %>

    + <%= render :partial => "articles/sections/history" %> + <% end %> <% end %> From b6663c90c1b64c7705f05751a7c6072971835c0b Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Mon, 28 Dec 2015 09:28:30 -0800 Subject: [PATCH 10/27] Last attchment image is article thumbnail to allow easy thumbnail changing. --- app/views/articles/_thumbnail.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/articles/_thumbnail.html.erb b/app/views/articles/_thumbnail.html.erb index 259879a..b9d9a07 100644 --- a/app/views/articles/_thumbnail.html.erb +++ b/app/views/articles/_thumbnail.html.erb @@ -1,6 +1,6 @@ -<% article.attachments.each do |attach| %> +<% article.attachments.reverse_each do |attach| %> <% if attach.thumbnailable? %> <%= link_to raw(""), { :controller => 'articles', :action => 'show', :id => article.id, :project_id => project_id}, :title => article.title %> From 6ecefd23a67be44d1c7c426b1fbd11c04083351f Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Mon, 28 Dec 2015 09:49:05 -0800 Subject: [PATCH 11/27] Cleaned up thumbnail link generation. --- app/views/articles/_thumbnail.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/articles/_thumbnail.html.erb b/app/views/articles/_thumbnail.html.erb index b9d9a07..3b63e91 100644 --- a/app/views/articles/_thumbnail.html.erb +++ b/app/views/articles/_thumbnail.html.erb @@ -2,8 +2,9 @@ <% article.attachments.reverse_each do |attach| %> <% if attach.thumbnailable? %> - - <%= link_to raw(""), { :controller => 'articles', :action => 'show', :id => article.id, :project_id => project_id}, :title => article.title %> + + <%= link_to image_tag( thumbnail_path(attach)), + { :controller => 'articles', :action => 'show', :id => article.id, :project_id => project_id}, :title => article.title %> <% break %> <% end %> <% end %> From 454a0eceee2b62a75e3ea6caad45cd3824f97a4d Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Mon, 28 Dec 2015 11:48:48 -0800 Subject: [PATCH 12/27] Improved list format with thumbnails. --- app/views/articles/_list.html.erb | 6 ++---- assets/stylesheets/knowledgebase.css | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/articles/_list.html.erb b/app/views/articles/_list.html.erb index 6a7ecb2..287f21d 100644 --- a/app/views/articles/_list.html.erb +++ b/app/views/articles/_list.html.erb @@ -26,15 +26,13 @@

    <% end %> - - <%= format_article_summary(article, summary_format, :truncate => truncate_length ) %> - - <% if redmine_knowledgebase_settings_value(:show_thumbnails_for_articles) %>
    <%= render :partial => "articles/thumbnail", :locals => { :article => article, :imgclass => 'thumbnail-list', :project_id => @project } %>
    <% end %> + + <%= format_article_summary(article, summary_format, :truncate => truncate_length ) %> <% end %> diff --git a/assets/stylesheets/knowledgebase.css b/assets/stylesheets/knowledgebase.css index 1e5a063..deca3ef 100644 --- a/assets/stylesheets/knowledgebase.css +++ b/assets/stylesheets/knowledgebase.css @@ -30,6 +30,7 @@ h3.cattitle { line-height: 20px; padding: 6px 0 6px 40px; min-height: 40px; + overflow: hidden; } .article-icon .summary { font-size: 80%; @@ -37,6 +38,11 @@ h3.cattitle { color: #666; line-height: 16px; } +.article-list-thumbnail { + float: right; + margin-left: 3px; +} + .category-articles .article-icon { width: 28%; From fb8bcfd39ae5a3637a68f7bb44378cbb9dbea7df Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Mon, 28 Dec 2015 12:13:36 -0800 Subject: [PATCH 13/27] Toprated list was not being used. --- app/views/articles/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/articles/index.html.erb b/app/views/articles/index.html.erb index 695e45f..735f9df 100644 --- a/app/views/articles/index.html.erb +++ b/app/views/articles/index.html.erb @@ -48,7 +48,7 @@ <% if User.current.allowed_to?(:view_top_rated_articles, @project) %>

    <%= l(:title_top_rated_articles) %>

    - <%= render :partial => 'articles/list', :locals => { :summary_format => "toprated", :articles => @articles_latest, :default_icon => 'top-rated' } %> + <%= render :partial => 'articles/list', :locals => { :summary_format => "toprated", :articles => @articles_toprated, :default_icon => 'top-rated' } %>
    <% end %> From b0647415911bb4e67e1dc0f7f2001c2ca2bf2bb4 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Mon, 28 Dec 2015 18:49:47 -0800 Subject: [PATCH 14/27] Fixed #305, top rated list not being valid. --- app/controllers/articles_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index ccc482f..c0199d8 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -26,7 +26,9 @@ def index @articles_newest = @project.articles.order("created_at DESC").first(summary_limit) @articles_latest = @project.articles.order("updated_at DESC").first(summary_limit) @articles_popular = @project.articles.includes(:viewings).limit(summary_limit).sort_by(&:view_count).reverse - @articles_toprated = @project.articles.includes(:ratings).limit(summary_limit).sort_by(&:rated_count).reverse + + toprated = @project.articles.includes(:ratings).sort_by { |a| [a.rating_average, a.rated_count] }.reverse + @articles_toprated = toprated.shift(summary_limit) @tags = @project.articles.tag_counts end From a6a2899e98375fa003552aeb37ad3006abac7933 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Mon, 28 Dec 2015 19:07:15 -0800 Subject: [PATCH 15/27] Sort tags alphabetically on index page. --- app/controllers/articles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index c0199d8..483e3fa 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -30,7 +30,7 @@ def index toprated = @project.articles.includes(:ratings).sort_by { |a| [a.rating_average, a.rated_count] }.reverse @articles_toprated = toprated.shift(summary_limit) - @tags = @project.articles.tag_counts + @tags = @project.articles.tag_counts.sort { |a, b| a.name.downcase <=> b.name.downcase } end def new From a5e4b28d92060a798712ede15b699d3f91a78508 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Tue, 29 Dec 2015 14:32:21 -0800 Subject: [PATCH 16/27] Added tag filtering on category table view. --- app/controllers/categories_controller.rb | 10 ++++++++++ app/views/categories/show.html.erb | 16 ++++++++++++++++ assets/stylesheets/knowledgebase.css | 3 +++ config/locales/en.yml | 2 ++ 4 files changed, 31 insertions(+) diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index c6294ac..fc26509 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -14,13 +14,23 @@ class CategoriesController < ApplicationController rescue_from ActiveRecord::RecordNotFound, :with => :force_404 def show + @articles = @category.articles.order("#{sort_column} #{sort_direction}") + + if params[:tag] + @tag = params[:tag] + @articles = @articles.tagged_with(@tag) + end + @categories = @project.categories.where(:parent_id => nil) + @tags = @articles.tag_counts.sort { |a, b| a.name.downcase <=> b.name.downcase } + respond_to do |format| format.html { render :template => 'categories/show', :layout => !request.xhr? } format.atom { render_feed(@articles, :title => "#{l(:knowledgebase_title)}: #{l(:label_category)}: #{@category.title}") } end + end def new diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb index fc554a1..f5c6807 100644 --- a/app/views/categories/show.html.erb +++ b/app/views/categories/show.html.erb @@ -25,6 +25,16 @@

    <%= l(:title_browse_by_category) %>

    <%= render :partial => "categories/tree" %> + + +
    +

    <%= l(:label_filter_by_tag) %>

    + + <% tag_cloud(@tags, ['tag-x-small', 'tag-small', 'tag-medium', 'tag-large', 'tag-x-large']) do |tag, css_class| %> + <%= link_to(tag.name, {:controller => 'categories', :action => 'show', :id => @category.id, :project_id => @project, :tag => tag.name }, :class => "tag #{css_class}") %> + <% end %> +
    + <% end %>
    <%= textilizable @category.description unless @category.description.nil? %>
    @@ -40,6 +50,12 @@ <% end %> +<% if @tag %> +

    <%= l(:label_filtered_by_tag) %> <%= @tag %>   +<%= link_to("", {:controller => 'categories', :action => 'show', :id => @category.id, :project_id => @project }, :class => "icon icon-delete") %> +

    +<% end %> + <% if @category.articles.length > 0%>
    <%= render :partial => 'articles/list_table', :locals => { :articles => @articles } %> diff --git a/assets/stylesheets/knowledgebase.css b/assets/stylesheets/knowledgebase.css index deca3ef..c12b0a3 100644 --- a/assets/stylesheets/knowledgebase.css +++ b/assets/stylesheets/knowledgebase.css @@ -106,6 +106,9 @@ h3.cattitle { .tag-large { font-size: 120%; } .tag-x-large { font-size: 150%; } +a.icon-delete {background:url(../images/delete.gif) no-repeat 0 -16px} + + /* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */ div.rating-cancel,div.star-rating{float:left;width:17px;height:15px;text-indent:-999em;cursor:pointer;display:block;background:transparent;overflow:hidden} div.rating-cancel,div.rating-cancel a{background:url(../images/delete.gif) no-repeat 0 -16px} diff --git a/config/locales/en.yml b/config/locales/en.yml index 367d440..3254c77 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -32,6 +32,8 @@ en: label_description: Description label_edit_article: Edit label_edit_category: "Edit Category" + label_filtered_by_tag: "Filtered by tag:" + label_filter_by_tag: "Filter by Tag" label_jump_category: "Jump Category" label_kb_article_plural: "Knowledgebase articles" label_kb_home: Home From d5e9acfd3d142dfec7c661aeee13c5b5e9e8774d Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Tue, 29 Dec 2015 17:41:05 -0800 Subject: [PATCH 17/27] Implemented #306, added optional permission for users to manage just their own articles. Conflicts: app/controllers/articles_controller.rb --- app/controllers/articles_controller.rb | 24 ++++++++++++++++++++++++ app/models/kb_article.rb | 6 ++++-- app/views/articles/show.html.erb | 9 ++++++--- config/locales/en.yml | 9 +++++---- init.rb | 4 ++++ 5 files changed, 43 insertions(+), 9 deletions(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 483e3fa..e66e89c 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -83,13 +83,25 @@ def show end def edit + if not @article.editable_by?(User.current) + render_403 + return false + end + @categories=@project.categories.all + # don't keep previous comment @article.version_comments = nil @article.version = params[:version] end def update + + if not @article.editable_by?(User.current) + render_403 + return false + end + @article.updater_id = User.current.id params[:article][:category_id] = params[:category_id] @categories = @project.categories.all @@ -129,6 +141,12 @@ def destroy_comment end def destroy + + if not @article.editable_by?(User.current) + render_403 + return false + end + KbMailer.article_destroy(@article).deliver @article.destroy flash[:notice] = l(:label_article_removed) @@ -136,6 +154,12 @@ def destroy end def add_attachment + + if not @article.editable_by?(User.current) + render_403 + return false + end + attachments = attach(@article, params[:attachments]) redirect_to({ :action => 'show', :id => @article.id, :project_id => @project }) end diff --git a/app/models/kb_article.rb b/app/models/kb_article.rb index cd89469..ab91174 100644 --- a/app/models/kb_article.rb +++ b/app/models/kb_article.rb @@ -69,8 +69,10 @@ def recipients notified.collect(&:mail) end - def editable_by?(user) - user.allowed_to?(:edit_articles, self.project) + def editable_by?(user = User.current) + return user.allowed_to?(:edit_articles, self.project) || + user.allowed_to?(:manage_articles, self.project) || + (user.allowed_to?(:manage_own_articles, self.project) && self.author_id == user.id) end def attachments_deletable?(user = User.current) diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index fe8c64b..2fb88a4 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -11,9 +11,12 @@
    <% content_for :sidebar do %> -
      -
    • <%= link_to_if_authorized l(:label_edit_article), { :controller => 'articles', :action => 'edit', :id => @article.id, :project_id => @project}, :class => 'icon icon-edit' %>
    • -
    • <%= link_to_if_authorized l(:label_delete_article), { :controller => 'articles', :action => 'destroy', :id => @article.id, :project_id => @project}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
    • +
        + <% if @article.editable_by?(User.current) %> +
      • <%= link_to l(:label_edit_article), { :controller => 'articles', :action => 'edit', :id => @article.id, :project_id => @project}, :class => 'icon icon-edit' %>
      • +
      • <%= link_to l(:label_delete_article), { :controller => 'articles', :action => 'destroy', :id => @article.id, :project_id => @project}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
      • + <% end %> +
      • <%= link_to_if_authorized l(:label_new_comment), { :controller => "articles", :action => "comment", :article_id => @article.id, :project_id => @project}, :class => "icon icon-comment", :remote => true, :method => :get %>
      • <%= render :partial => 'watchers/watchers', :locals => {:watched => @article} %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 3254c77..f5d488d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -70,15 +70,16 @@ en: permission_create_articles: "Create articles" permission_edit_articles: "Edit articles" permission_manage_article_categories: "Manage article categories" - permission_manage_article_history: "manage article history" + permission_manage_article_history: "Manage article history" permission_manage_articles: "Manage articles" permission_manage_articles_comments: "Manage articles comments" - permission_view_article_history: "view article history" + permission_manage_own_articles: "Manage own articles" + permission_view_article_history: "View article history" permission_view_articles: "View articles" permission_view_kb_articles: "View articles" - permission_view_most_popular_articles: "view most popular articles" + permission_view_most_popular_articles: "View most popular articles" permission_view_recent_articles: "View recent articles" - permission_view_top_rated_articles: "view top rated articles" + permission_view_top_rated_articles: "View top rated articles" permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase diff --git a/init.rb b/init.rb index feded26..48540fe 100644 --- a/init.rb +++ b/init.rb @@ -53,6 +53,10 @@ :preview, :comment, :add_comment, :destroy_comment, :tagged], :categories => [:index, :show] } + permission :manage_own_articles, { + :articles => [:index, :show, :edit, :update, :destroy, :add_attachment, :preview, :tagged], + :categories => [:index, :show] + } permission :manage_articles_comments, { :articles => [:index, :show, :comment, :add_comment, :destroy_comment], :categories => [:index, :show] From ef88149ae3956e5f5e63f6735611a33129249e02 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Thu, 31 Dec 2015 09:54:59 -0800 Subject: [PATCH 18/27] Added authored view so users can find articles by author easily. --- app/controllers/articles_controller.rb | 17 ++++++++++- app/helpers/knowledgebase_helper.rb | 2 +- app/views/articles/_breadcrumb.html.erb | 11 +++++++ app/views/articles/_list.html.erb | 9 +----- app/views/articles/_list_table.html.erb | 25 ++++++++++++++-- app/views/articles/authored.html.erb | 39 +++++++++++++++++++++++++ app/views/articles/index.html.erb | 3 +- config/locales/en.yml | 1 + config/routes.rb | 1 + init.rb | 2 +- 10 files changed, 96 insertions(+), 14 deletions(-) create mode 100644 app/views/articles/_breadcrumb.html.erb create mode 100644 app/views/articles/authored.html.erb diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index e66e89c..fda27e3 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -9,7 +9,7 @@ class ArticlesController < ApplicationController include WatchersHelper before_filter :find_project_by_project_id, :authorize - before_filter :get_article, :except => [:index, :new, :create, :preview, :comment, :tagged, :rate] + before_filter :get_article, :except => [:index, :new, :create, :preview, :comment, :tagged, :rate, :authored] rescue_from ActionView::MissingTemplate, :with => :force_404 rescue_from ActiveRecord::RecordNotFound, :with => :force_404 @@ -33,6 +33,21 @@ def index @tags = @project.articles.tag_counts.sort { |a, b| a.name.downcase <=> b.name.downcase } end + def authored + + @author_id = params[:author_id] + @articles = @project.articles.where(:author_id => @author_id).order("kb_articles.#{sort_column} #{sort_direction}") + + if params[:tag] + @tag = params[:tag] + @articles = @articles.tagged_with(@tag) + end + + @categories = @project.categories.where(:parent_id => nil) + + @tags = @articles.tag_counts.sort { |a, b| a.name.downcase <=> b.name.downcase } + end + def new @article = KbArticle.new @categories = @project.categories.all diff --git a/app/helpers/knowledgebase_helper.rb b/app/helpers/knowledgebase_helper.rb index a5a7dc3..a987081 100644 --- a/app/helpers/knowledgebase_helper.rb +++ b/app/helpers/knowledgebase_helper.rb @@ -64,7 +64,7 @@ def sortable(column, title = nil) title ||= column.titleize css_class = column == sort_column ? "current #{sort_direction}" : nil direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc" - link_to title, {:id => params[:id], :sort => column, :direction => direction }, {:class => css_class} + link_to title, {:id => params[:id], :tag => params[:tag], :author_id => params[:author_id], :sort => column, :direction => direction }, {:class => css_class} end def article_to_pdf(article, project) diff --git a/app/views/articles/_breadcrumb.html.erb b/app/views/articles/_breadcrumb.html.erb new file mode 100644 index 0000000..e5a795c --- /dev/null +++ b/app/views/articles/_breadcrumb.html.erb @@ -0,0 +1,11 @@ + + + + diff --git a/app/views/articles/_list.html.erb b/app/views/articles/_list.html.erb index 287f21d..e61fd6f 100644 --- a/app/views/articles/_list.html.erb +++ b/app/views/articles/_list.html.erb @@ -16,14 +16,7 @@ <%= link_to truncate(article.title, :length => truncate_length), { :controller => 'articles', :action => 'show', :id => article.id, :project_id => @project}, :title => article.title %> <% if redmine_knowledgebase_settings_value(:show_breadcrumbs_for_article_lists) %> - + <%= render :partial => "articles/breadcrumb", :locals => { :article => article, :project => @project } %> <% end %> <% if redmine_knowledgebase_settings_value(:show_thumbnails_for_articles) %> diff --git a/app/views/articles/_list_table.html.erb b/app/views/articles/_list_table.html.erb index 92b57d2..9c09d52 100644 --- a/app/views/articles/_list_table.html.erb +++ b/app/views/articles/_list_table.html.erb @@ -6,8 +6,14 @@ <%= "Thumbnail" %> <% end %> <%= sortable "title" %> + + <% if not @category and redmine_knowledgebase_settings_value(:show_breadcrumbs_for_article_lists) %> + <%= "Category" %> + <% end %> + <%= "Rating" %> - <%= sortable "author_id", "Author" %> + + <% unless @author_id %><%= sortable "author_id", "Author" %><% end %> <%= sortable "created_at", "Created" %> <%= sortable "updated_at", "Updated" %> @@ -35,8 +41,23 @@ <% end %> + <% if not @category and redmine_knowledgebase_settings_value(:show_breadcrumbs_for_article_lists) %> + + <%= render :partial => "articles/breadcrumb", :locals => { :article => article, :project => @project } %> + + <% end %> + <% rating = article.rating_average.to_i %><%= rating != 0 ? "#{rating} / 5" : "-" %> - <%= (link_to_user(article.author)).html_safe %> + + <% unless @author_id %> + + <%= link_to article.author.name, { :controller => 'articles', + :action => 'authored', + :author_id => article.author.id, + :project_id => @project} %> + + <% end %> + <%= time_ago_in_words article.created_at %> ago <%= time_ago_in_words article.updated_at %> ago diff --git a/app/views/articles/authored.html.erb b/app/views/articles/authored.html.erb new file mode 100644 index 0000000..acd1187 --- /dev/null +++ b/app/views/articles/authored.html.erb @@ -0,0 +1,39 @@ + +
        + <%= render :partial => "categories/jump_box" %> +
        + +

        <%= l(:label_authored_by) %> <%= link_to_user(User.find(@author_id)) %>

        + + +<% content_for :sidebar do %> + +

        <%= l(:title_browse_by_category) %>

        + <%= render :partial => "categories/tree" %> + + +
        +

        <%= l(:label_filter_by_tag) %>

        + + <% tag_cloud(@tags, ['tag-x-small', 'tag-small', 'tag-medium', 'tag-large', 'tag-x-large']) do |tag, css_class| %> + <%= link_to(tag.name, {:controller => 'articles', :action => 'authored', :project_id => @project, :author_id => @author_id, :tag => tag.name }, :class => "tag #{css_class}") %> + <% end %> +
        + +<% end %> + +<% if @tag %> +

        <%= l(:label_filtered_by_tag) %> <%= @tag %>   +<%= link_to("", {:controller => 'articles', :action => 'authored', :author_id => @author_id, :project_id => @project }, :class => "icon icon-delete") %> +

        +<% end %> + +<% if @articles.length > 0%> +
        + <%= render :partial => 'articles/list_table', :locals => { :articles => @articles } %> +
        +<% end %> + +<% content_for :header_tags do %> + <%= stylesheet_link_tag 'knowledgebase', :plugin => 'redmine_knowledgebase' %> +<% end %> diff --git a/app/views/articles/index.html.erb b/app/views/articles/index.html.erb index 735f9df..b0eefd3 100644 --- a/app/views/articles/index.html.erb +++ b/app/views/articles/index.html.erb @@ -25,8 +25,9 @@
        • <%= l(:label_overview_total_categories, :total_categories => @total_categories.to_i) %>
        • <%= l(:label_overview_total_articles, :total_articles => @total_articles.to_i) %>
        • + <% if User.current.allowed_to?(:create_articles, @project) %> -
        • <%= l(:label_overview_my_articles, :total_articles_by_me => @total_articles_by_me.to_i) %>
        • +
        • <%= link_to_if_authorized l(:label_overview_my_articles, :total_articles_by_me => @total_articles_by_me.to_i), { :controller => 'articles', :action => 'authored', :project_id => @project, :author_id => User.current.id} %>
        • <% end %>
        diff --git a/config/locales/en.yml b/config/locales/en.yml index f5d488d..9d6f29e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -20,6 +20,7 @@ en: one: "Viewed once" other: "Viewed %{count} times" label_attachment_add: "Add files" + label_authored_by: "Authored by" label_category: Category label_category_created: "Created category '%{title}'" label_category_deleted: "Category deleted" diff --git a/config/routes.rb b/config/routes.rb index 8b5af3a..b2c2e19 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,6 +6,7 @@ resources :articles do collection do get "tagged" + get "authored" post "preview" end diff --git a/init.rb b/init.rb index 48540fe..ddedd9a 100644 --- a/init.rb +++ b/init.rb @@ -33,7 +33,7 @@ project_module :knowledgebase do permission :view_kb_articles, { - :articles => [:index, :show, :tagged], + :articles => [:index, :show, :tagged, :authored], :categories => [:index, :show] } permission :comment_and_rate_articles, { From ee18ea4d9dd772a457137657b7027b14aebcab09 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Thu, 31 Dec 2015 15:24:31 -0800 Subject: [PATCH 19/27] Fixed translation --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 9d6f29e..19561fe 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -20,7 +20,7 @@ en: one: "Viewed once" other: "Viewed %{count} times" label_attachment_add: "Add files" - label_authored_by: "Authored by" + label_authored_by: "Articles authored by" label_category: Category label_category_created: "Created category '%{title}'" label_category_deleted: "Category deleted" From 743648707e4e2ba012d2b61e60affc49956f6256 Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Fri, 1 Jan 2016 10:01:51 -0800 Subject: [PATCH 20/27] Fix for #304 - article view counts not updating --- app/controllers/articles_controller.rb | 8 +++----- lib/acts_as_viewed.rb | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index fda27e3..63097cf 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -25,10 +25,8 @@ def index @articles_newest = @project.articles.order("created_at DESC").first(summary_limit) @articles_latest = @project.articles.order("updated_at DESC").first(summary_limit) - @articles_popular = @project.articles.includes(:viewings).limit(summary_limit).sort_by(&:view_count).reverse - - toprated = @project.articles.includes(:ratings).sort_by { |a| [a.rating_average, a.rated_count] }.reverse - @articles_toprated = toprated.shift(summary_limit) + @articles_popular = @project.articles.includes(:viewings).sort_by(&:view_count).reverse.first(summary_limit) + @articles_toprated = @project.articles.includes(:ratings).sort_by { |a| [a.rating_average, a.rated_count] }.reverse.first(summary_limit) @tags = @project.articles.tag_counts.sort { |a, b| a.name.downcase <=> b.name.downcase } end @@ -36,7 +34,7 @@ def index def authored @author_id = params[:author_id] - @articles = @project.articles.where(:author_id => @author_id).order("kb_articles.#{sort_column} #{sort_direction}") + @articles = @project.articles.where(:author_id => @author_id).order("#{KbArticle.table_name}.#{sort_column} #{sort_direction}") if params[:tag] @tag = params[:tag] diff --git a/lib/acts_as_viewed.rb b/lib/acts_as_viewed.rb index ee06cfe..087656b 100644 --- a/lib/acts_as_viewed.rb +++ b/lib/acts_as_viewed.rb @@ -176,9 +176,9 @@ def viewed_by? ip, viewer = nil raise ViewedError, "the viewer object must be the one used when defining acts_as_viewed (or a descendent of it). other objects are not acceptable" end if viewer && !viewer.id.nil? - return viewings.count(:conditions => ["viewer_id = '#{viewer.id}' or ip = '#{ip}'"]) > 0 + return viewings.where(['viewer_id = ? or ip = ?', viewer.id, ip]).count > 0 else - return viewings.count(:conditions => ["ip = '#{ip}'"]) > 0 + return viewings.where(['ip = ?', ip]).count > 0 end end From 4ee40949a2460b869881bd967e39a9ae6bdbf13e Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Fri, 29 Jan 2016 06:39:37 -0800 Subject: [PATCH 21/27] Possible fix for #300 --- app/models/kb_article.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/kb_article.rb b/app/models/kb_article.rb index ab91174..4fe55d8 100644 --- a/app/models/kb_article.rb +++ b/app/models/kb_article.rb @@ -54,7 +54,7 @@ class KbArticle < ActiveRecord::Base :date_column => "#{table_name}.created_at" end - has_many :comments, -> { order 'created_on DESC' }, :as => :commented, :dependent => :delete_all + has_many :comments, -> { order 'created_on DESC' }, :as => :commented, :dependent => :destroy scope :visible, lambda {|*args| { :include => :project, :conditions => Project.allowed_to_condition(args.shift || User.current, :view_kb_articles, *args) } } From 547724985a311e71276dfb8d98fc5e7d8670ee8d Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Fri, 29 Jan 2016 07:59:43 -0800 Subject: [PATCH 22/27] Fix for #308 --- app/helpers/knowledgebase_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/knowledgebase_helper.rb b/app/helpers/knowledgebase_helper.rb index a987081..478f9bb 100644 --- a/app/helpers/knowledgebase_helper.rb +++ b/app/helpers/knowledgebase_helper.rb @@ -1,6 +1,7 @@ module KnowledgebaseHelper include Redmine::Export::PDF include KnowledgebaseSettingsHelper + include ActionView::Helpers::NumberHelper def format_article_summary(article, format, options = {}) output = case format From 4d49b0b145699fac300163d6e9f1e914894b9c7d Mon Sep 17 00:00:00 2001 From: Rob Spearman Date: Fri, 29 Jan 2016 18:46:25 -0800 Subject: [PATCH 23/27] Avoid #293 by preventing user from deleting categories with existing subcategories. Conflicts: app/controllers/categories_controller.rb --- app/controllers/categories_controller.rb | 21 ++++++++++++++------- app/views/categories/show.html.erb | 3 ++- config/locales/en.yml | 3 ++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index fc26509..0330f57 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -63,16 +63,23 @@ def edit end def destroy - @categories=@project.categories.all + @categories = @project.categories.all - if @category.articles.size == 0 - @category.destroy - flash[:notice] = l(:label_category_deleted) - redirect_to({ :controller => :articles, :action => 'index', :project_id => @project}) - else - @articles = @category.articles.all #find(:all) + # Do not allow deletion of categories with existing subcategories + @subcategories = @project.categories.where(:parent_id => @category.id) + + if @subcategories.size != 0 + @articles = @category.articles.all + flash[:error] = l(:label_category_has_subcategory_cannot_delete) + render(:action => 'show') + elsif @category.articles.size != 0 + @articles = @category.articles.all flash[:error] = l(:label_category_not_empty_cannot_delete) render(:action => 'show') + else + @category.destroy + flash[:notice] = l(:label_category_deleted) + redirect_to({ :controller => :articles, :action => 'index', :project_id => @project}) end end diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb index f5c6807..c8c236b 100644 --- a/app/views/categories/show.html.erb +++ b/app/views/categories/show.html.erb @@ -26,7 +26,7 @@

        <%= l(:title_browse_by_category) %>

        <%= render :partial => "categories/tree" %> - + <% if @tags %>

        <%= l(:label_filter_by_tag) %>

        @@ -34,6 +34,7 @@ <%= link_to(tag.name, {:controller => 'categories', :action => 'show', :id => @category.id, :project_id => @project, :tag => tag.name }, :class => "tag #{css_class}") %> <% end %>
        + <% end %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 19561fe..642377d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -24,7 +24,8 @@ en: label_category: Category label_category_created: "Created category '%{title}'" label_category_deleted: "Category deleted" - label_category_not_empty_cannot_delete: "Category is assigned to articles and could not be deleted." + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." + label_category_not_empty_cannot_delete: "Category can not be deleted because it contains articles." label_category_plural: Categories label_category_updated: "Category updated" label_content: Content From 7c65d33c3d98eed3fef7145b19c0ce0d9e1bf08e Mon Sep 17 00:00:00 2001 From: Kris Lou Date: Mon, 21 Dec 2015 11:49:32 -0800 Subject: [PATCH 24/27] CSS: Moves label_overview out of the splitcontentleft class This makes the Overview h2 part of the default content, instead of part of the splitcontentleft class. Plays nicer with Pixel-Cookers. --- app/views/articles/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/articles/index.html.erb b/app/views/articles/index.html.erb index b0eefd3..48bd920 100644 --- a/app/views/articles/index.html.erb +++ b/app/views/articles/index.html.erb @@ -18,8 +18,8 @@ <% else %> <% if User.current.allowed_to?(:view_kb_articles, @project) %> +

        <%=l(:label_overview)%>

        -

        <%=l(:label_overview)%>

        <%= l(:title_overview_summary) %>

          From 5d624b7609b2c4521118d2f56aa083b3e74da836 Mon Sep 17 00:00:00 2001 From: Kris Lou Date: Tue, 22 Dec 2015 11:57:43 -0800 Subject: [PATCH 25/27] CSS: Applies Wiki div to the Article Title The Article Title is an unformatted (and un-classed)

          . This applies the "wiki" div class to the title. --- app/views/articles/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 2fb88a4..84c4df6 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -47,7 +47,7 @@ <%= link_to @article.category.title, { :controller => 'categories', :action => 'show', :id => @article.category.id, :project_id => @project} %>

          -

          <%= @article.title %>

          +

          <%= @article.title %>

          <% unless redmine_knowledgebase_settings_value(:disable_article_summaries) %>
          <%= @article.summary %>
          <% end %> From e15bce62523b2abd13387d15ba94238c8a94cb9d Mon Sep 17 00:00:00 2001 From: Alex Bevilacqua Date: Wed, 22 Jun 2016 20:41:31 -0400 Subject: [PATCH 26/27] update version to 3.2.0 --- AUTHORS | 6 ++++-- init.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 52f4ae7..d6a48e1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,6 +22,8 @@ Contributors: * Messinger * xarlie * Rob Spearman +* Eduard Kuleshov +* Axel Kämpfe Documentation: * Alan Bowman @@ -57,7 +59,7 @@ French: * myorama * Xavier Calland * LabriePierre - + German: * eschsa * cforce @@ -97,7 +99,7 @@ Spanish: * Carlos Solano * dtamajon -Swedish: +Swedish: * Peter Brauner Turkish: diff --git a/init.rb b/init.rb index ddedd9a..2c35397 100644 --- a/init.rb +++ b/init.rb @@ -19,7 +19,7 @@ author_url "http://www.alexbevi.com" description 'A plugin for Redmine that adds knowledgebase functionality' url 'https://github.com/alexbevi/redmine_knowledgebase' - version '3.0.7' + version '3.2.0' requires_redmine :version_or_higher => '2.0.0' requires_acts_as_taggable_on From f8b82cb43b2b8282aec83711c1d24e185141428b Mon Sep 17 00:00:00 2001 From: Alex Bevilacqua Date: Wed, 22 Jun 2016 20:42:33 -0400 Subject: [PATCH 27/27] re-sync translations for 3.2.0 --- config/locales/bg.yml | 11 +++++++++++ config/locales/cs.yml | 11 +++++++++++ config/locales/de.yml | 11 +++++++++++ config/locales/el.yml | 11 +++++++++++ config/locales/en.yml | 6 +++--- config/locales/es.yml | 11 +++++++++++ config/locales/fr.yml | 11 +++++++++++ config/locales/hu.yml | 11 +++++++++++ config/locales/it.yml | 11 +++++++++++ config/locales/ja.yml | 11 +++++++++++ config/locales/ko.yml | 11 +++++++++++ config/locales/nl.yml | 11 +++++++++++ config/locales/pl.yml | 11 +++++++++++ config/locales/pt-BR.yml | 11 +++++++++++ config/locales/ru.yml | 11 +++++++++++ config/locales/tr.yml | 11 +++++++++++ config/locales/zh-TW.yml | 11 +++++++++++ config/locales/zh.yml | 11 +++++++++++ 18 files changed, 190 insertions(+), 3 deletions(-) diff --git a/config/locales/bg.yml b/config/locales/bg.yml index f5a5d34..9e1996c 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -19,9 +19,12 @@ bg: label_article_viewed: one: "Разглеждана един път" other: "Разглеждана %{count} пъти" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Категория label_category_created: "Създадена категория '%{title}'" label_category_deleted: "Категорията е премахната" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "В категорията има статии и поради това не може да бъде премахната." label_category_plural: Категории label_category_updated: "Категорията е обновена" @@ -31,6 +34,8 @@ bg: label_description: Описание label_edit_article: Редактиране label_edit_category: "Редактиране на категория" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Преход към категория" label_kb_article_plural: "Knowledgebase articles" label_kb_home: Начало @@ -56,6 +61,7 @@ bg: label_title: Заглавие label_title_articles: Статия label_title_category: Категория + label_unrated_article: Unrated label_updated_who: "Обновено от %{updater} преди %{age}" message_no_articles: "Все още няма добавени статии в базата знания. Може би сега ще започнете с първата ..." message_no_categories: "За съжаление няма дефинирани категории, и вие трябва да влезете в Redmine за да създадете нови категории." @@ -69,6 +75,7 @@ bg: permission_manage_article_history: "manage article history" permission_manage_articles: "Управление на статии" permission_manage_articles_comments: "Управление на коментарите" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "Разглеждане на статии" permission_view_kb_articles: "View articles" @@ -78,7 +85,11 @@ bg: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Показване на информацията за категориите в дървовидна структура?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Ограничение на анотациите по размер" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 07a520e..523a9da 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -19,9 +19,12 @@ cs: label_article_viewed: one: "Zobrazeno jednou" other: "Zobrazeno %{count} krát" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Kategorie label_category_created: "Byla vytvořena kategorie %{title}" label_category_deleted: "Kategorie byla smazána" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Kategorie obsahuje články a nemůže být smazána." label_category_plural: Kategorie label_category_updated: "Kategorie byla aktualizována" @@ -31,6 +34,8 @@ cs: label_description: Popis label_edit_article: Upravit label_edit_category: "Upravit kategorii" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_home: Úvodní label_jump_category: "Skočit na kategorii" label_kb_article_plural: "Knowledgebase articles" @@ -57,6 +62,7 @@ cs: label_title: Název label_title_articles: Články label_title_category: Kategorie + label_unrated_article: Unrated label_updated_who: "Updated by %{updater} %{age} ago" message_no_articles: "Zatím nejsou ve znalostní databázi žádné články. Asi byste měli začít něco dělat..." message_no_categories: "Unfortunately, there aren't any Categories defined, and you need to be logged in to create new categories." @@ -70,6 +76,7 @@ cs: permission_manage_article_history: "manage article history" permission_manage_articles: "Spravovat články" permission_manage_articles_comments: "Spravovat komentáře" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "Zobrazit články" permission_view_kb_articles: "View articles" @@ -79,7 +86,11 @@ cs: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Zobrazit součty pro kategorie ve stromě?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Limit pro délku souhrnu" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/de.yml b/config/locales/de.yml index 666c176..0634d6d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -19,9 +19,12 @@ de: label_article_viewed: one: "Einmal gesehen" other: "%{count} mal gesehen" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Kategorie label_category_created: "Kategorie '%{title}' erstellt" label_category_deleted: "Kategorie gelöscht" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Dieser Kategorie sind noch Artikel zugewiesen und kann nicht gelöscht werden," label_category_plural: Kategorien label_category_updated: "Kategorie aktualisiert" @@ -31,6 +34,8 @@ de: label_description: Beschreibung label_edit_article: Bearbeiten label_edit_category: "Kategorie bearbeiten" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Zur Kategorie wechseln " label_kb_article_plural: "Wissensbasis Artikel" label_kb_home: Home @@ -56,6 +61,7 @@ de: label_title: Titel label_title_articles: Artikel label_title_category: Kategorie + label_unrated_article: Unrated label_updated_who: "Aktualisiert von %{updater} vor %{age}" message_no_articles: "Es wurde noch kein Artikel eingegeben. Beginnen Sie mit einem Artikel zum Thema..." message_no_categories: "Leider sind keine Kategorien definiert und Sie müssen eingeloggt sein um neue Kategorien zu erstellen." @@ -69,6 +75,7 @@ de: permission_manage_article_history: "Artikelhistorie verwalten" permission_manage_articles: "Artikel verwalten" permission_manage_articles_comments: "Artikelkommentare verwalten" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "Artikelhistorie ansehen" permission_view_articles: "Artikel anzeigen" permission_view_kb_articles: "Artikel anzeigen" @@ -78,7 +85,11 @@ de: permission_watch_articles: "Artikel beobachten" permission_watch_categories: "Kategorien beobachten" project_module_knowledgebase: Wissensbasis + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Anzahl der Artikel pro Katgeorie im Katgeoriebaum anzeigen?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Maximale Artikel in der Übersicht" text_confirm_versions_delete: "Diese Aktion wird alle eventuell vorliegenden neueren Versionen dieses Dokumentes revidieren und löschen. Sind Sie sicher?" text_current_version: Aktuell diff --git a/config/locales/el.yml b/config/locales/el.yml index 23e71f9..4e9e771 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -19,9 +19,12 @@ el: label_article_viewed: one: "Προβλήθηκε μία φορά" other: "Προβλήθηκε %{count} φορές" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Κατηγορία label_category_created: "Δημιουργημένη κατηγορία '%{title}'" label_category_deleted: "Η κατηγορία διαγράφηκε" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Η κατηγορία έχει ανατεθεί σε άρθρα με αποτέλεσμα να μη μπορεί να διαγραφεί." label_category_plural: Κατηγορίες label_category_updated: "Η κατηγορία επικαιροποιήθηκε" @@ -31,6 +34,8 @@ el: label_description: Περιγραφή label_edit_article: Επεξεργασία label_edit_category: "Επεξεργασία Κατηγορίας" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Μεταπήδηση σε Κατηγορία" label_kb_article_plural: "Knowledgebase articles" label_kb_home: Αρχική @@ -56,6 +61,7 @@ el: label_title: Τίτλος label_title_articles: Άρθρο label_title_category: Κατηγορία + label_unrated_article: Unrated label_updated_who: "Updated by %{updater} %{age} ago" message_no_articles: "Δεν έχουν προστεθέι άρθρα στην Γνωσιακή Βάση για την ώρα. Ίσως θέλετε να κάνετε την αρχή ..." message_no_categories: "Δυστυχώς, δεν έχουν καθοριστεί κατηγορίες, πρέπει να να συνδεθεί για να δημιουργήσετε νέες κατηγορίες." @@ -69,6 +75,7 @@ el: permission_manage_article_history: "manage article history" permission_manage_articles: "Manage articles" permission_manage_articles_comments: "Manage articles comments" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "View articles" permission_view_kb_articles: "View articles" @@ -78,7 +85,11 @@ el: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Εμφάνιση συνόλων κατηγοριών στο δέντρο;" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Όριο σύνοψης σελίδας της Γνωσιακής Βάσης" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/en.yml b/config/locales/en.yml index 642377d..1dec5e0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -34,8 +34,8 @@ en: label_description: Description label_edit_article: Edit label_edit_category: "Edit Category" - label_filtered_by_tag: "Filtered by tag:" label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Jump Category" label_kb_article_plural: "Knowledgebase articles" label_kb_home: Home @@ -61,8 +61,8 @@ en: label_title: Title label_title_articles: Article label_title_category: Category + label_unrated_article: Unrated label_updated_who: "Updated by %{updater} %{age} ago" - label_unrated_article: "Unrated" message_no_articles: "No articles have been added yet. Click Create Article to get started." message_no_categories: "No categories have been created. Click Create Category to get started." message_no_permissions: "You do not have permission to view any articles or categories. Please contact your administrator." @@ -85,10 +85,10 @@ en: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase - show_category_totals: "Show category totals in tree?" show_article_without_tabs: "Show articles without tabs?" show_attachments_first: "Show attachments before article content?" show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" + show_category_totals: "Show category totals in tree?" show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Knowledgebase summary page article limit" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" diff --git a/config/locales/es.yml b/config/locales/es.yml index 9d90bb8..fec7601 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -19,9 +19,12 @@ es: label_article_viewed: one: "Visto una vez" other: "Visto %{count} veces" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Categoría label_category_created: "Creada la categoría '%{title}'" label_category_deleted: "Categoría eliminada" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "La categoría está asignada a artículos y no se puede borrar." label_category_plural: Categorías label_category_updated: "Categoría actualizada" @@ -31,6 +34,8 @@ es: label_description: Descripción label_edit_article: Editar label_edit_category: "Editar categoría" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Saltar categoría" label_kb_article_plural: "Artículos de Conocimiento" label_kb_home: Inicio @@ -56,6 +61,7 @@ es: label_title: Título label_title_articles: Artículo label_title_category: Categoría + label_unrated_article: Unrated label_updated_who: "Actualizado por %{updater} hace %{age}" message_no_articles: "No hay artículos agregados. Empieza cuando quieras..." message_no_categories: "No hay ninguna categoría definida y necesitas estar validado para crear una nueva." @@ -69,6 +75,7 @@ es: permission_manage_article_history: "Gestionar historia de los artículos" permission_manage_articles: "Gestionar artículos" permission_manage_articles_comments: "Gestionar comentarios de los artículos" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "Ver historia de los artículos" permission_view_articles: "Ver artículos" permission_view_kb_articles: "Ver artículos" @@ -78,7 +85,11 @@ es: permission_watch_articles: "Monitorizar artículos" permission_watch_categories: "Monitorizar categorías" project_module_knowledgebase: "Base de conocimientos" + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "¿Mostrar los totales de categorías en el árbol?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Límite de artículos por página en el resumen de Conocimientos" text_confirm_versions_delete: "Esta acción revertirá y eliminará cualquier versión más nueva que pudiera existir de este documento.¿Estás seguro?" text_current_version: Actual diff --git a/config/locales/fr.yml b/config/locales/fr.yml index bfa58ab..e553891 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -20,9 +20,12 @@ fr: label_article_viewed: one: "Consulté une fois" other: "Consulté %{count} fois" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Catégorie label_category_created: "Categorie '%{title}' créée" label_category_deleted: "Catégorie supprimée" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Cette catégorie contient des articles et ne peut être supprimée." label_category_plural: Catégories label_category_updated: "Catégorie mise à jour" @@ -32,6 +35,8 @@ fr: label_description: Description label_edit_article: Éditer label_edit_category: "Modifier la catégorie" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Aller à la catégorie" label_kb_article_plural: "Articles de la base de connaissance" label_kb_home: "Page d'accueil" @@ -58,6 +63,7 @@ fr: label_title: Titre label_title_articles: Article label_title_category: Catégorie + label_unrated_article: Unrated label_updated_who: "Mis à jour par %{updater}, il y a %{age}" message_no_articles: "Aucun article n'a été ajouté à la base de connaissance." message_no_categories: "Il n'y a aucune catégorie pour l'instant, connectez-vous pour en créer une." @@ -71,6 +77,7 @@ fr: permission_manage_article_history: "Gérer l'historique des articles" permission_manage_articles: "Gérer les articles" permission_manage_articles_comments: "Gérer les commentaires d'articles" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "Voir l'historique des articles" permission_view_articles: "Voir les articles" permission_view_kb_articles: "Voir les articles" @@ -80,7 +87,11 @@ fr: permission_watch_articles: "Surveiller les articles" permission_watch_categories: "Surveiller les catégories" project_module_knowledgebase: "Base de connaissances" + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Afficher le total par catégorie dans l'arbre ?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Nombre maximum d'articles dans la page de résumé de la base de connaissance" text_confirm_versions_delete: "Retour en arrière et retrait de toutes nouvelles versions de ce document." text_current_version: "Version courrante" diff --git a/config/locales/hu.yml b/config/locales/hu.yml index dbcd626..54038c9 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -19,9 +19,12 @@ hu: label_article_viewed: one: "Megtekintve egyszer" other: "Megtekintve %{count} alkalommal" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Kategória label_category_created: "'%{title}' kategória létrehozva" label_category_deleted: "Kategória törölve" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "A kategória cikk(ek)hez van rendelve, ezért nem törölhető" label_category_plural: Kategóriák label_category_updated: "Kategória frissítve" @@ -31,6 +34,8 @@ hu: label_description: Leírás label_edit_article: Szerkesztés label_edit_category: "Kategória szerkesztése" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Ugrás kategóriára" label_kb_article_plural: "Tudásbázis cikkek" label_kb_home: _ @@ -56,6 +61,7 @@ hu: label_title: Cím label_title_articles: Cikkek label_title_category: Kategória + label_unrated_article: Unrated label_updated_who: "Frissítve %{updater} által %{age}" message_no_articles: "Még nem lettek cikkek létrehozva. Kattints a Cikkek létrehozására." message_no_categories: "Még nem lettek kategóriák létrehozva. Kattints a Kategóriák létrehozására." @@ -69,6 +75,7 @@ hu: permission_manage_article_history: "Cikk történetének kezelése" permission_manage_articles: "Cikkek kezelése" permission_manage_articles_comments: "Cikk hozzászólásainak kezelése" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "Cikk történetének megtekintése" permission_view_articles: "Cikkek megtekintése" permission_view_kb_articles: "Cikkek megtekintése" @@ -78,7 +85,11 @@ hu: permission_watch_articles: "Cikkek megfigyelése" permission_watch_categories: "Kategóriák megfigyelése" project_module_knowledgebase: Tudásbázis + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Mutassuk a kategória összesítőket a fában?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Tudásbázis összesítőben megjelenített cikkek száma" text_confirm_versions_delete: "A művelet visszaállítja és törli az összes újabb verzióját ennek a dokumentumnak. Biztos vagy benne?" text_current_version: Aktuális diff --git a/config/locales/it.yml b/config/locales/it.yml index bb79e58..6b42d86 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -19,9 +19,12 @@ it: label_article_viewed: one: "Viewed once" other: "Viewed %{count} times" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Categoria label_category_created: "Created category '%{title}'" label_category_deleted: "Category deleted" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Category is assigned to articles and could not be deleted." label_category_plural: Categorie label_category_updated: "Category updated" @@ -31,6 +34,8 @@ it: label_description: Descrizione label_edit_article: Edit label_edit_category: "Edit Category" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Vai alla categoria" label_kb_article_plural: "Knowledgebase articles" label_kb_home: Home @@ -56,6 +61,7 @@ it: label_title: Titolo label_title_articles: Articolo label_title_category: Categoria + label_unrated_article: Unrated label_updated_who: "Updated by %{updater} %{age} ago" message_no_articles: "Nessun articolo è stato ancora aggiunto alla knowledgebase." message_no_categories: "Unfortunately, there aren't any Categories defined, and you need to be logged in to create new categories." @@ -69,6 +75,7 @@ it: permission_manage_article_history: "manage article history" permission_manage_articles: "Manage articles" permission_manage_articles_comments: "Manage articles comments" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "View articles" permission_view_kb_articles: "View articles" @@ -78,7 +85,11 @@ it: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Show category totals in tree?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Knowledgebase summary page article limit" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/ja.yml b/config/locales/ja.yml index c9d9b44..9881960 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -19,9 +19,12 @@ ja: label_article_viewed: one: 1人が閲覧 other: "%{count}人が閲覧" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: カテゴリ label_category_created: "'%{title}'カテゴリーを作成しました." label_category_deleted: カテゴリーを削除しました. + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: 関連記事があるため,カテゴリーを削除できません. label_category_plural: カテゴリ一覧 label_category_updated: カテゴリーを更新しました. @@ -31,6 +34,8 @@ ja: label_description: 説明 label_edit_article: 編集 label_edit_category: カテゴリを編集 + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_home: ホーム label_jump_category: カテゴリー選択 label_kb_article_plural: ナレッジベースの記事 @@ -57,6 +62,7 @@ ja: label_title: 件名 label_title_articles: 記事 label_title_category: カテゴリ + label_unrated_article: Unrated label_updated_who: "%{updater}によって%{age}に更新" message_no_articles: ナレッジベースに追加された記事はありません.早速作りましょう! message_no_categories: 定義されたカテゴリがありません.新しいカテゴリを作成するにはログインする必要があります. @@ -70,6 +76,7 @@ ja: permission_manage_article_history: 記事の履歴管理 permission_manage_articles: 記事の管理 permission_manage_articles_comments: 記事のコメント管理 + permission_manage_own_articles: "Manage own articles" permission_view_article_history: 記事履歴の閲覧 permission_view_articles: 記事の閲覧 permission_view_kb_articles: 記事の閲覧 @@ -79,7 +86,11 @@ ja: permission_watch_articles: 記事のウォッチ permission_watch_categories: カテゴリのウォッチ project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: ツリーの全てのカテゴリを表示する + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: ナレッジベースに表示する記事数 text_confirm_versions_delete: このドキュメントの新しいバージョンが存在する場合、記事は逆戻りして削除されます.よろしいですか? text_current_version: 現在のバージョン diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 672612c..64152e7 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -19,9 +19,12 @@ ko: label_article_viewed: one: "1회 조회" other: "%{count}회 조회" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: 카테고리 label_category_created: "'%{title}' 카테고리를 작성했습니다." label_category_deleted: "카테고리를 삭제했습니다.." + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "관련지식이 있는 관계로 카테고리를 삭제할 수 없습니다." label_category_plural: "카테고리 목록" label_category_updated: "카테고리를 수정했습니다." @@ -31,6 +34,8 @@ ko: label_description: 설명 label_edit_article: 수정 label_edit_category: "카테고리 수정" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_home: Home label_jump_category: "카테고리 선택" label_kb_article_plural: "Knowledgebase articles" @@ -57,6 +62,7 @@ ko: label_title: 제목 label_title_articles: 지식명 label_title_category: 카테고리명 + label_unrated_article: Unrated label_updated_who: "%{updater}이(가) %{age}전에 수정했습니다." message_no_articles: "지식 데이터베이스에 추가된 지식이 없습니다." message_no_categories: "죄송합니다. 등록된 카테고리가 없습니다. 새로운 카테고리를 작성하시려면 로그인이 필요합니다." @@ -70,6 +76,7 @@ ko: permission_manage_article_history: "manage article history" permission_manage_articles: "지식 관리" permission_manage_articles_comments: "지식 댓글 관리" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "지식 보기" permission_view_kb_articles: "View articles" @@ -79,7 +86,11 @@ ko: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "모든 카테고리 표시" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "지식자료에 표시되는 지식수" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/nl.yml b/config/locales/nl.yml index bdccf8a..b83d19a 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -19,9 +19,12 @@ nl: label_article_viewed: one: "Eenmaal gezien" other: "Gezien: %{count} keer" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Categorie label_category_created: "Aangemaakt categorie '%{title}'" label_category_deleted: "Categorie verwijderd" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "De categorie is aan een of meerdere artikelen toegewezen en kan nu niet worden verwijderd." label_category_plural: Categoriën label_category_updated: "Categorie bijgewerkt" @@ -31,6 +34,8 @@ nl: label_description: Beschrijving label_edit_article: Bewerken label_edit_category: "Bewerk categorie" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Snel naar categorie" label_kb_article_plural: "Kennisbank artikelen" label_kb_home: Home @@ -56,6 +61,7 @@ nl: label_title: Titel label_title_articles: Artikel label_title_category: Categorie + label_unrated_article: Unrated label_updated_who: "Bijgewerkt door %{updater} %{age} geleden" message_no_articles: "Er zijn nog geen artikelen toegevoegd. Klik op 'Maak artikel' om er een te beginnen." message_no_categories: "Er zijn nog geen categoriën toegevoegd. Klik op 'Maak categorie' om er een te beginnen." @@ -69,6 +75,7 @@ nl: permission_manage_article_history: "Beheer artikelgeschiedenis" permission_manage_articles: "Beheer artikelen" permission_manage_articles_comments: "Beheer gebruikersreacties" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "Weergeven artikelgeschiedenis" permission_view_articles: "Weergeven artikelen" permission_view_kb_articles: "Weergeven artikelen" @@ -78,7 +85,11 @@ nl: permission_watch_articles: "Bekijk artikelen" permission_watch_categories: "Bekijk categoriën" project_module_knowledgebase: Kennisbank + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Totalen categorie in hierarchie?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "KB samenvatting artikel limiet per pagina" text_confirm_versions_delete: "Dit zal nieuwere versies en recente wijzigingen mogelijk verwijderen. Weet je dat zeker?" text_current_version: Huidige diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 4c6125a..8e5fd56 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -19,9 +19,12 @@ pl: label_article_viewed: one: "Oglądany raz" other: "Oglądany %{count} razy" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Kategoria label_category_created: "Kategoria '%{title}' utworzona" label_category_deleted: "Kategoria usunięta" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Kategoria jest przypisana do artykułów, więc nie mogła zostać usunięta." label_category_plural: Kategorie label_category_updated: "Kategoria zaktualizowana" @@ -31,6 +34,8 @@ pl: label_description: Opis label_edit_article: Edytuj label_edit_category: "Edytuj kategorię" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Idź do kategorii" label_kb_article_plural: "Artykuły bazy wiedzy" label_kb_home: "Strona główna" @@ -56,6 +61,7 @@ pl: label_title: Tytuł label_title_articles: Artykuł label_title_category: Kategoria + label_unrated_article: Unrated label_updated_who: "Zaktualizowane przez %{updater} %{age} temu" message_no_articles: "W bazie wiedzy nie ma jeszcze żadnych artykułów." message_no_categories: "Niestety, niema zdefiniowanych żadnych kategorii. Musisz być zalogowany by utworzyć nowe kategorie." @@ -69,6 +75,7 @@ pl: permission_manage_article_history: "Zarządzaj historią artykułów" permission_manage_articles: "Zarządzaj artykułami" permission_manage_articles_comments: "Zarządzaj komentarzami artykułów" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "Przeglądaj historię artykułu" permission_view_articles: "Przeglądaj artykuły" permission_view_kb_articles: "Przeglądaj artykuły" @@ -78,7 +85,11 @@ pl: permission_watch_articles: "Obserwuj artykuły" permission_watch_categories: "Obserwuj kategorie" project_module_knowledgebase: "Baza wiedzy" + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Pokazywać podsumowania kategorii w drzewie?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Ograniczenie strony podsumowania artykułu bazy wiedzy" text_confirm_versions_delete: "To cofnie i usunie wszystkie nowsze wersje tego dokumentu, które mogą istnieć. Jesteś pewien?" text_current_version: Aktualna diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index bebb912..6e49499 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -19,9 +19,12 @@ pt-BR: label_article_viewed: one: "Viewed once" other: "Viewed %{count} times" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Categoria label_category_created: "Created category '%{title}'" label_category_deleted: "Category deleted" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Category is assigned to articles and could not be deleted." label_category_plural: Categorias label_category_updated: "Category updated" @@ -31,6 +34,8 @@ pt-BR: label_description: Descrição label_edit_article: Edit label_edit_category: "Edit Category" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Ir para Categoria" label_kb_article_plural: "Knowledgebase articles" label_kb_home: "Página Inicial" @@ -56,6 +61,7 @@ pt-BR: label_title: Título label_title_articles: Artigo label_title_category: Categoria + label_unrated_article: Unrated label_updated_who: "Updated by %{updater} %{age} ago" message_no_articles: "Nenhum artigo cadastrado ainda, talvez você queira começar..." message_no_categories: "Unfortunately, there aren't any Categories defined, and you need to be logged in to create new categories." @@ -69,6 +75,7 @@ pt-BR: permission_manage_article_history: "manage article history" permission_manage_articles: "Manage articles" permission_manage_articles_comments: "Manage articles comments" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "View articles" permission_view_kb_articles: "View articles" @@ -78,7 +85,11 @@ pt-BR: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Show category totals in tree?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Knowledgebase summary page article limit" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/ru.yml b/config/locales/ru.yml index b61aef1..9b03a70 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -19,9 +19,12 @@ ru: label_article_viewed: one: "Просмотрена один раз" other: "Просмотрена %{count} раз" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Категория label_category_created: "Создана категория '%{title}'" label_category_deleted: "Категория удалена" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Категория содержит статьи и не может быть удалена." label_category_plural: Категории label_category_updated: "Категория обновлена" @@ -31,6 +34,8 @@ ru: label_description: Описание label_edit_article: Редактировать label_edit_category: "Редактировать категорию" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Перейти к категории" label_kb_article_plural: "Статьи базы знаний" label_kb_home: Начало @@ -57,6 +62,7 @@ ru: label_title: Заголовок label_title_articles: Статьи label_title_category: Категория + label_unrated_article: Unrated label_updated_who: "Обновлено %{updater} %{age} назад" message_no_articles: "В базе знаний нет ни одной статьи. Чтобы начать нажмите Создать статью..." message_no_categories: "В базе знаний нет ни одной категории. Чтобы начать нажмите Создать категорию..." @@ -70,6 +76,7 @@ ru: permission_manage_article_history: "Управлять историей статей" permission_manage_articles: "Управлять статьями" permission_manage_articles_comments: "Управлять комментариями к статьям" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "Просматривать историю статей" permission_view_articles: "Просматривать статьи" permission_view_kb_articles: "Просматривать статьи" @@ -79,7 +86,11 @@ ru: permission_watch_articles: "Следить за статьями" permission_watch_categories: "Следить за категориями" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Показать информацию по категориям в виде дерева?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Лимит статей на странице сводки" text_confirm_versions_delete: "Данное изменение отменит и удалит все возможные новые версии данного докмуента. Вы уверены?" text_current_version: Текущая diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 8617ce3..221d0d2 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -19,9 +19,12 @@ tr: label_article_viewed: one: "Bir kez görüntülendi" other: "%{count} defa görüntülendi" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: Kategori label_category_created: "'%{title}' kategorisi oluşturuldu" label_category_deleted: "Kategori silindi" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Bu kategoride makaleler var ve silinemez." label_category_plural: Kategoriler label_category_updated: "Kategori güncellendi" @@ -31,6 +34,8 @@ tr: label_description: Açıklama label_edit_article: Düzenle label_edit_category: "Kategoriyi düzenle" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: "Kategoriye git" label_kb_article_plural: "Knowledgebase articles" label_kb_home: Anasayfa @@ -56,6 +61,7 @@ tr: label_title: Başlık label_title_articles: Makale label_title_category: Kategori + label_unrated_article: Unrated label_updated_who: "Updated by %{updater} %{age} ago" message_no_articles: "Henüz bilgi bankasına hiç bir makale eklenmedi. Belki bir kaç tane eklemek istersiniz..." message_no_categories: "Unfortunately, there aren't any Categories defined, and you need to be logged in to create new categories." @@ -69,6 +75,7 @@ tr: permission_manage_article_history: "manage article history" permission_manage_articles: "Manage articles" permission_manage_articles_comments: "Manage articles comments" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "View articles" permission_view_kb_articles: "View articles" @@ -78,7 +85,11 @@ tr: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Kategori toplamını ağaç yapısnda göster?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Bilgi bankası özet sayfası makale sınırı" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 2d03813..2e69414 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -19,9 +19,12 @@ zh-TW: label_article_viewed: one: "Viewed once" other: "Viewed %{count} times" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: 類別 label_category_created: "Created category '%{title}'" label_category_deleted: "Category deleted" + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: "Category is assigned to articles and could not be deleted." label_category_plural: 類別 label_category_updated: "Category updated" @@ -31,6 +34,8 @@ zh-TW: label_description: 描述 label_edit_article: Edit label_edit_category: "Edit Category" + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: 移至類別 label_kb_article_plural: "Knowledgebase articles" label_kb_home: Home @@ -56,6 +61,7 @@ zh-TW: label_title: 標題 label_title_articles: 文章 label_title_category: 類別 + label_unrated_article: Unrated label_updated_who: "Updated by %{updater} %{age} ago" message_no_articles: 目前尚未有任何文章 message_no_categories: "Unfortunately, there aren't any Categories defined, and you need to be logged in to create new categories." @@ -69,6 +75,7 @@ zh-TW: permission_manage_article_history: "manage article history" permission_manage_articles: "Manage articles" permission_manage_articles_comments: "Manage articles comments" + permission_manage_own_articles: "Manage own articles" permission_view_article_history: "view article history" permission_view_articles: "View articles" permission_view_kb_articles: "View articles" @@ -78,7 +85,11 @@ zh-TW: permission_watch_articles: "Watch articles" permission_watch_categories: "Watch categories" project_module_knowledgebase: Knowledgebase + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: "Show category totals in tree?" + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: "Knowledgebase summary page article limit" text_confirm_versions_delete: "This will revert and delete any newer versions of this document that may exist. Are you sure?" text_current_version: Current diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 2aabe6f..ec1aced 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -19,9 +19,12 @@ zh: label_article_viewed: one: "已阅 1 次" other: "已阅 %{count} 次" + label_attachment_add: "Add files" + label_authored_by: "Articles authored by" label_category: 分类 label_category_created: "分类【'%{title}'】已创建" label_category_deleted: 分类已删除 + label_category_has_subcategory_cannot_delete: "Category can not be deleted because it contains a subcategory." label_category_not_empty_cannot_delete: 当前分类下有文章,不能删除 label_category_plural: 分类 label_category_updated: 分类已更新 @@ -31,6 +34,8 @@ zh: label_description: 描述 label_edit_article: 编辑 label_edit_category: 编辑分类 + label_filter_by_tag: "Filter by Tag" + label_filtered_by_tag: "Filtered by tag:" label_jump_category: 跳转到分类 label_kb_article_plural: 知识库文章 label_kb_home: 知识库主页 @@ -56,6 +61,7 @@ zh: label_title: 标题 label_title_articles: 文章 label_title_category: 分类 + label_unrated_article: Unrated label_updated_who: "由 %{updater} 更新于 %{age} 前" message_no_articles: 目前尚未有任何文章 message_no_categories: 目前未定义任何分类。您需要至少创建一个知识分类。 @@ -69,6 +75,7 @@ zh: permission_manage_article_history: 管理文章历史 permission_manage_articles: 管理文章 permission_manage_articles_comments: 管理文章评论 + permission_manage_own_articles: "Manage own articles" permission_view_article_history: 查看文章历史 permission_view_articles: 查看文章 permission_view_kb_articles: 查看文章 @@ -78,7 +85,11 @@ zh: permission_watch_articles: 关注文章 permission_watch_categories: 关注分类 project_module_knowledgebase: 知识库 + show_article_without_tabs: "Show articles without tabs?" + show_attachments_first: "Show attachments before article content?" + show_breadcrumbs_for_article_lists: "Show breadcrumbs for articles in lists?" show_category_totals: 在分类树中显示数量? + show_thumbnails_for_articles: "Show thumbnails for articles in lists?" summary_item_limit: 知识库主页文章限制 text_confirm_versions_delete: 文章所有改动将丢失,是否继续? text_current_version: 当前