solarsearch 0.0.6 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.specification +2 -1
- data/Rakefile +19 -24
- data/VERSION +1 -1
- data/app/controllers/search_keywords_controller.rb +2 -1
- data/app/helpers/article_helper.rb +0 -23
- data/app/models/article.rb +4 -3
- data/app/models/article_status.rb +2 -0
- data/app/models/user.rb +3 -3
- data/app/models/user_session.rb +1 -1
- data/app/views/article/_article.html.haml +17 -0
- data/app/views/article/_article_line.html.haml +14 -0
- data/app/views/article/_article_list.html.haml +6 -0
- data/app/views/article/_result_summary.html.haml +7 -0
- data/app/views/article/_search_form.html.haml +3 -0
- data/app/views/article/search.html.haml +7 -0
- data/app/views/article/show.html.haml +4 -0
- data/app/views/article_statuses/index.html.haml +11 -0
- data/app/views/infosources/edit.html.haml +19 -0
- data/app/views/infosources/index.html.haml +16 -0
- data/app/views/infosources/new.html.haml +17 -0
- data/app/views/infosources/show.html.haml +22 -0
- data/app/views/infosources/tester.html.haml +7 -0
- data/app/views/search_keywords/_form.html.haml +4 -0
- data/app/views/search_keywords/edit.html.haml +8 -0
- data/app/views/search_keywords/index.html.haml +11 -0
- data/app/views/search_keywords/new.html.haml +6 -0
- data/app/views/search_keywords/newsupdate.html.haml +11 -0
- data/app/views/search_keywords/show.html.haml +12 -0
- data/app/views/user_mailer/newsupdate.html.haml +22 -0
- data/app/views/user_sessions/new.html.haml +28 -0
- data/app/views/users/_user.html.haml +28 -0
- data/app/views/users/edit.html.haml +2 -0
- data/app/views/users/index.html.haml +10 -0
- data/app/views/users/new.html.haml +2 -0
- data/app/views/users/show.html.haml +18 -0
- data/app/views/users/update.html.haml +0 -0
- data/config/locales/hu.yml +152 -110
- data/config/locales/sk.yml +152 -110
- data/lib/solarsearch/compass.rb +5 -0
- data/lib/solarsearch/{locales.rb → rails/locales.rb} +0 -1
- data/lib/solarsearch/{routing.rb → rails/routing.rb} +0 -0
- data/lib/solarsearch/rails.rb +11 -0
- data/lib/solarsearch.rb +6 -7
- data/rails/init.rb +1 -0
- data/solarsearch.gemspec +47 -16
- data/stylesheets/solarsearch/ie.sass +15 -0
- data/stylesheets/solarsearch/partials/_article.sass +120 -0
- data/stylesheets/solarsearch/partials/_base.sass +11 -0
- data/stylesheets/solarsearch/print.sass +3 -0
- data/stylesheets/solarsearch/screen.sass +286 -0
- data/test/unit/article_test.rb +39 -3
- data/test/unit/user_test.rb +25 -4
- metadata +43 -12
- data/Solarsearch.gemspec +0 -176
- data/test/unit/helpers/article_helper_test.rb +0 -20
data/.specification
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solarsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 99.99.99
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gyorgy Frivolt
|
@@ -247,6 +247,7 @@ post_install_message:
|
|
247
247
|
rdoc_options:
|
248
248
|
- --charset=UTF-8
|
249
249
|
require_paths:
|
250
|
+
- bin
|
250
251
|
- lib
|
251
252
|
required_ruby_version: !ruby/object:Gem::Requirement
|
252
253
|
requirements:
|
data/Rakefile
CHANGED
@@ -3,23 +3,16 @@ require 'rake'
|
|
3
3
|
require 'rake/testtask'
|
4
4
|
require 'rake/rdoctask'
|
5
5
|
|
6
|
+
desc 'Test the solarsearch plugin.'
|
6
7
|
Rake::TestTask.new(:test) do |test|
|
7
8
|
test.libs << 'lib' << 'test'
|
8
|
-
test.pattern = 'test
|
9
|
+
test.pattern = 'test/**/*_test.rb'
|
9
10
|
test.verbose = true
|
10
11
|
end
|
11
12
|
|
12
13
|
desc 'Default: run unit tests.'
|
13
14
|
task :default => :test
|
14
15
|
|
15
|
-
desc 'Test the solarsearch plugin.'
|
16
|
-
Rake::TestTask.new(:test) do |t|
|
17
|
-
t.libs << 'lib'
|
18
|
-
t.libs << 'test'
|
19
|
-
t.pattern = 'test/**/*_test.rb'
|
20
|
-
t.verbose = true
|
21
|
-
end
|
22
|
-
|
23
16
|
desc 'Generate documentation for the solarsearch plugin.'
|
24
17
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
25
18
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
@@ -30,6 +23,19 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
30
23
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
31
24
|
end
|
32
25
|
|
26
|
+
begin
|
27
|
+
require 'rcov/rcovtask'
|
28
|
+
Rcov::RcovTask.new do |test|
|
29
|
+
test.libs << 'test'
|
30
|
+
test.pattern = 'test/**/test_*.rb'
|
31
|
+
test.verbose = true
|
32
|
+
end
|
33
|
+
rescue LoadError
|
34
|
+
task :rcov do
|
35
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
33
39
|
begin
|
34
40
|
require 'jeweler'
|
35
41
|
Jeweler::Tasks.new do |gem|
|
@@ -41,18 +47,19 @@ begin
|
|
41
47
|
gem.authors = ["Gyorgy Frivolt"]
|
42
48
|
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
43
49
|
|
44
|
-
gem.add_dependency 'content_scrapper', '>=0.0.
|
50
|
+
gem.add_dependency 'content_scrapper', '>=0.0.6'
|
45
51
|
gem.add_dependency 'compass'
|
46
52
|
gem.add_dependency 'haml'
|
47
53
|
gem.add_dependency 'authlogic'
|
48
54
|
gem.add_dependency 'will_paginate'
|
49
55
|
gem.add_dependency 'whenever'
|
50
56
|
gem.add_dependency 'acl9'
|
51
|
-
gem.add_dependency 'sunspot'
|
57
|
+
gem.add_dependency 'sunspot', '>=0.10.9'
|
52
58
|
# sunspot_rails was installed also as a plugin because otherwise problem with tasks appear
|
53
|
-
gem.add_dependency 'sunspot_rails'
|
59
|
+
#gem.add_dependency 'sunspot_rails'
|
54
60
|
gem.add_dependency 'RedCloth'
|
55
61
|
gem.add_dependency 'sanitize'
|
62
|
+
gem.add_dependency 'loofah'
|
56
63
|
gem.add_dependency 'nokogiri'
|
57
64
|
gem.add_dependency 'feedzirra'
|
58
65
|
gem.add_dependency 'mysql'
|
@@ -62,15 +69,3 @@ rescue LoadError
|
|
62
69
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
63
70
|
end
|
64
71
|
|
65
|
-
begin
|
66
|
-
require 'rcov/rcovtask'
|
67
|
-
Rcov::RcovTask.new do |test|
|
68
|
-
test.libs << 'test'
|
69
|
-
test.pattern = 'test/**/test_*.rb'
|
70
|
-
test.verbose = true
|
71
|
-
end
|
72
|
-
rescue LoadError
|
73
|
-
task :rcov do
|
74
|
-
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
75
|
-
end
|
76
|
-
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
@@ -21,7 +21,8 @@ class SearchKeywordsController < ApplicationController
|
|
21
21
|
|
22
22
|
def newsupdate
|
23
23
|
page = (params[:page] || 1).to_i
|
24
|
-
@articles = current_user.collect_recent_articles.paginate(:page => page,
|
24
|
+
@articles = current_user.collect_recent_articles.paginate(:page => page,
|
25
|
+
:per_page => Article.per_page)
|
25
26
|
end
|
26
27
|
|
27
28
|
def postnews
|
@@ -1,25 +1,2 @@
|
|
1
1
|
module ArticleHelper
|
2
|
-
|
3
|
-
MORE_CHARACTERS_TOLERANCE = 100
|
4
|
-
NUMBER_OF_CHARACTERS = 1200
|
5
|
-
|
6
|
-
def shorten_text(text, number_of_characters = NUMBER_OF_CHARACTERS, more_link = nil)
|
7
|
-
if !(text.nil? || text.empty?)
|
8
|
-
if text.length <= number_of_characters
|
9
|
-
shorter_text = text
|
10
|
-
else
|
11
|
-
punction_char_after_end = \
|
12
|
-
(text[number_of_characters..number_of_characters+MORE_CHARACTERS_TOLERANCE] =~ /\.|,|;/) || 0
|
13
|
-
shorter_text = text[0..number_of_characters + punction_char_after_end]
|
14
|
-
|
15
|
-
if more_link
|
16
|
-
shorter_text += more_link
|
17
|
-
end
|
18
|
-
end
|
19
|
-
else
|
20
|
-
shorter_text = ''
|
21
|
-
end
|
22
|
-
|
23
|
-
shorter_text
|
24
|
-
end
|
25
2
|
end
|
data/app/models/article.rb
CHANGED
@@ -33,7 +33,8 @@ class Article < ActiveRecord::Base
|
|
33
33
|
time :published_at
|
34
34
|
dynamic_boolean :status do
|
35
35
|
article_statuses.inject({}) do |user_statuses_hash, article_status|
|
36
|
-
user_status_symbol = Article.give_user_status_symbol(article_status.user,
|
36
|
+
user_status_symbol = Article.give_user_status_symbol(article_status.user,
|
37
|
+
article_status.status)
|
37
38
|
user_statuses_hash.merge(user_status_symbol => true)
|
38
39
|
end
|
39
40
|
end
|
@@ -43,7 +44,7 @@ class Article < ActiveRecord::Base
|
|
43
44
|
validates_uniqueness_of :guid, :allow_nil => true
|
44
45
|
|
45
46
|
def self.give_user_status_symbol(user, status)
|
46
|
-
"user#{user
|
47
|
+
"user#{user[:id]}_status#{status}".to_sym
|
47
48
|
end
|
48
49
|
|
49
50
|
def size
|
@@ -63,7 +64,7 @@ class Article < ActiveRecord::Base
|
|
63
64
|
end
|
64
65
|
|
65
66
|
def remove_illegal_characters
|
66
|
-
ugly_characters = "\x00-\x1F"
|
67
|
+
ugly_characters = "\x00-\x1F"
|
67
68
|
exchange_character = ' '
|
68
69
|
author.tr!(ugly_characters, exchange_character) unless author.nil?
|
69
70
|
title.tr!(ugly_characters, exchange_character) unless title.nil?
|
@@ -17,4 +17,6 @@ class ArticleStatus < ActiveRecord::Base
|
|
17
17
|
validates_presence_of :status, :message => I18n.t(:status_not_set_validation_error)
|
18
18
|
validates_uniqueness_of :status, :scope => [:user_id, :article_id],
|
19
19
|
:message => I18n.t(:status_user_article_not_unique_validation_error)
|
20
|
+
|
21
|
+
#FIXME: after the creation the solr indices need to be updated by the information about the changed status
|
20
22
|
end
|
data/app/models/user.rb
CHANGED
@@ -49,7 +49,6 @@ class User < ActiveRecord::Base
|
|
49
49
|
acts_as_authentic
|
50
50
|
acts_as_authorization_subject
|
51
51
|
|
52
|
-
#FIXME: is not unittested
|
53
52
|
def post_recent_news
|
54
53
|
recent_articles = collect_recent_articles do |article|
|
55
54
|
article.size <= User::MAX_SIZE_OF_A_MAIL_IN_CHARACTERS
|
@@ -104,12 +103,13 @@ class User < ActiveRecord::Base
|
|
104
103
|
|
105
104
|
def recent_articles_for_search_keyword(search_keyword)
|
106
105
|
searchquery = search_keyword.query
|
106
|
+
self_user = self
|
107
107
|
search = Sunspot.search(Article) do
|
108
108
|
keywords searchquery
|
109
109
|
with(:published_at).greater_than Time.now - NEWSUPDATE_RECENT_NUMBER_OF_DAYS.day
|
110
110
|
dynamic :status do
|
111
|
-
without Article.give_user_status_symbol(
|
112
|
-
without Article.give_user_status_symbol(
|
111
|
+
without Article.give_user_status_symbol(self_user, ArticleStatus::STATUS_VIEWED), true
|
112
|
+
without Article.give_user_status_symbol(self_user, ArticleStatus::STATUS_SENT), true
|
113
113
|
end
|
114
114
|
order_by(:published_at, :desc)
|
115
115
|
paginate(:page => 1, :per_page => MAX_NUMBER_OF_ARTICLES_PER_NEWSUPDATE)
|
data/app/models/user_session.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
class UserSession < Authlogic::Session::Base
|
2
|
-
end
|
2
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- sourcename = !article.infosource.nil? ? article.infosource.sourcename : t(:unknown_infosource)
|
2
|
+
.article
|
3
|
+
.article_title
|
4
|
+
= link_to_unless_current(article.title, { :controller => 'article', :action => 'show', :id => article.id })
|
5
|
+
.article_source
|
6
|
+
- if article.url
|
7
|
+
= link_to sourcename, article.url
|
8
|
+
- else
|
9
|
+
= sourcename
|
10
|
+
.article_summary
|
11
|
+
= RedCloth.new(article.summary.to_s).to_html
|
12
|
+
%br
|
13
|
+
.article_body
|
14
|
+
= RedCloth.new(article.body.to_s).to_html
|
15
|
+
%br
|
16
|
+
.article_published
|
17
|
+
= I18n.localize article.published_at unless article.published_at.nil?
|
@@ -0,0 +1,14 @@
|
|
1
|
+
- article = article_line
|
2
|
+
- sourcename = !article.infosource.nil? ? article.infosource.sourcename : t(:unknown_infosource)
|
3
|
+
.article
|
4
|
+
.article_title
|
5
|
+
= link_to_unless_current(article.title, { :controller => 'article', :action => 'show', :id => article.id })
|
6
|
+
.article_source
|
7
|
+
- if article.url
|
8
|
+
= link_to sourcename, article.url
|
9
|
+
- else
|
10
|
+
= sourcename
|
11
|
+
.article_summary
|
12
|
+
= RedCloth.new(article.summary.to_s).to_html
|
13
|
+
.article_published
|
14
|
+
= I18n.localize article.published_at unless article.published_at.nil?
|
@@ -0,0 +1,6 @@
|
|
1
|
+
- if @articles and not @articles.empty?
|
2
|
+
= render :partial => "article/result_summary"
|
3
|
+
= render :partial => 'article/article_line', :collection => @articles
|
4
|
+
= render :partial => "article/result_summary"
|
5
|
+
- elsif params[:q]
|
6
|
+
= t :did_not_find_any_results_for_query, :query => params[:q]
|
@@ -0,0 +1,7 @@
|
|
1
|
+
- if @articles
|
2
|
+
.searchsummary
|
3
|
+
= t :search_summary_articles_from, :articles_from => @articles.offset+1
|
4
|
+
= t :search_summary_articles_to, :articles_to => (@articles.current_page < @articles.total_pages) ? @articles.offset+@articles.per_page : @articles.total_entries
|
5
|
+
= t :search_summary_number_of_articles, :articles_total => @articles.total_entries
|
6
|
+
%br
|
7
|
+
= will_paginate @articles, {:previous_label => t(:pagination_previous_label), :next_label => t(:pagination_next_label)}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- title t(:article_statuses_view_title)
|
2
|
+
|
3
|
+
#listing
|
4
|
+
= will_paginate @article_statuses
|
5
|
+
%ol{ :start => (@article_statuses.current_page-1)*@article_statuses.per_page+1 }
|
6
|
+
- for article_status in @article_statuses
|
7
|
+
- article = article_status.article
|
8
|
+
%li
|
9
|
+
= t :article_status_line, :article_status => h(ArticleStatus::WORD_FOR_STATUS[article_status.status]), :status_update_date => h(I18n.localize(article_status.updated_at, :format => :short))
|
10
|
+
= link_to shorten_text(article.title,50,'..'), :controller => 'article', :action => 'show', :id => article
|
11
|
+
= will_paginate @article_statuses
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- title t(:infosource_edit_view_title)
|
2
|
+
|
3
|
+
#dialog
|
4
|
+
- form_for(@infosource) do |f|
|
5
|
+
= f.error_messages
|
6
|
+
%p
|
7
|
+
= f.label t(:infosources_sourcename_form_field_label)
|
8
|
+
%br
|
9
|
+
= f.text_field :sourcename
|
10
|
+
%p
|
11
|
+
= f.label t(:infosources_url_form_field_label)
|
12
|
+
%br
|
13
|
+
= f.text_field :sourcefeed
|
14
|
+
%p
|
15
|
+
= f.submit t(:infosources_change_action_label)
|
16
|
+
%br
|
17
|
+
= link_to t(:infosources_view_action_label), @infosource
|
18
|
+
|
|
19
|
+
= link_to t(:infosources_back_to_the_list_action_label), infosources_path
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- title t(:infosources_list_view_title)
|
2
|
+
|
3
|
+
#dialog
|
4
|
+
%ul
|
5
|
+
- @infosources.each do |infosource|
|
6
|
+
%li
|
7
|
+
= link_to infosource.sourcename, infosource
|
8
|
+
= link_to t(:infosources_change_action_label), edit_infosource_path(infosource), :class => 'dialog_item_navigation'
|
9
|
+
,
|
10
|
+
= link_to t(:infosources_destroy_action_label), infosource, :confirm => t(:are_you_sure_confirmation), :method => :delete, :class => 'dialog_item_navigation'
|
11
|
+
- if not (infosource.sourcefeed.nil? || infosource.sourcefeed.empty?)
|
12
|
+
%ul{ :style => "list-style: none" }
|
13
|
+
%li
|
14
|
+
= link_to infosource.sourcefeed, infosource.sourcefeed, :class => 'dialog_item_navigation'
|
15
|
+
%br
|
16
|
+
= link_to t(:infosources_new_action_label), new_infosource_path
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- title t(:infosources_new_view_title)
|
2
|
+
|
3
|
+
#dialog
|
4
|
+
- form_for(@infosource) do |f|
|
5
|
+
= f.error_messages
|
6
|
+
%p
|
7
|
+
= f.label t(:infosources_sourcename_form_field_label)
|
8
|
+
%br
|
9
|
+
= f.text_field :sourcename
|
10
|
+
%p
|
11
|
+
= f.label t(:infosources_url_form_field_label)
|
12
|
+
%br
|
13
|
+
= f.text_field :sourcefeed
|
14
|
+
%p
|
15
|
+
= f.submit t(:infosources_create_action_label)
|
16
|
+
%br
|
17
|
+
= link_to t(:infosources_back_to_the_list_action_label), infosources_path
|
@@ -0,0 +1,22 @@
|
|
1
|
+
- title t(:infosources_show_view_title)
|
2
|
+
|
3
|
+
#dialog
|
4
|
+
%p
|
5
|
+
%em
|
6
|
+
= t(:infosources_sourcename_form_field_label)
|
7
|
+
= @infosource.sourcename
|
8
|
+
%p
|
9
|
+
%em
|
10
|
+
= t(:infosources_url_form_field_label)
|
11
|
+
= @infosource.sourcefeed
|
12
|
+
%br
|
13
|
+
= link_to t(:infosources_fetch_action_label), :action => 'fetch', :id => @infosource
|
14
|
+
|
|
15
|
+
= link_to t(:infosources_change_action_label), edit_infosource_path(@infosource)
|
16
|
+
|
|
17
|
+
= link_to t(:infosources_destroy_action_label), @infosource, :confirm => t(:are_you_sure_confirmation), :method => :delete
|
18
|
+
|
|
19
|
+
= link_to t(:infosources_back_to_the_list_action_label), infosources_path
|
20
|
+
|
21
|
+
#content
|
22
|
+
= render :partial => 'article/article_list', :locals => {:shorten => :no_summary}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
|
2
|
+
#content
|
3
|
+
- form_tag({ :action => "tester" }, :method => "get") do
|
4
|
+
= text_field_tag "url", params[:url], :size => 50
|
5
|
+
%input{ :type => "submit", :value => t(:infosources_test_scrapper_for_page_label) }
|
6
|
+
|
7
|
+
= @webpage_content.nil? ? "<em>#{t(:infosources_empty_web_page_content_text)}</em>" : @webpage_content
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- title t(:search_keywords_index_view_title)
|
2
|
+
|
3
|
+
#dialog
|
4
|
+
= t(:search_keywords_new_search_keyword_text)
|
5
|
+
= render :partial => 'form', :action => 'create'
|
6
|
+
= t(:search_keywords_my_search_keywords)
|
7
|
+
%br
|
8
|
+
%ul
|
9
|
+
- for search_keyword in @search_keywords
|
10
|
+
%li
|
11
|
+
= link_to search_keyword.query, search_keyword
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- title t(:search_keywords_my_news_view_title)
|
2
|
+
|
3
|
+
#listing
|
4
|
+
= t(:this_page_shows_news_not_older_than_xy_days_text, :days => User::NEWSUPDATE_RECENT_NUMBER_OF_DAYS)
|
5
|
+
= t(:for_a_keyword_only_xy_results_are_listed, :results => User::MAX_NUMBER_OF_ARTICLES_PER_NEWSUPDATE)
|
6
|
+
= t(:news_which_were_viewed_through_the_web_and_were_of_your_interest_are_not_listed)
|
7
|
+
%br
|
8
|
+
= render :partial => "article/article_list", :locals => { :shorten => :short_content }
|
9
|
+
%br
|
10
|
+
|
11
|
+
= link_to t(:search_keywords_send_to_email_action_label), postnews_path
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- title t(:search_keywords_show_view_title)
|
2
|
+
|
3
|
+
#dialog
|
4
|
+
%p
|
5
|
+
= t(:search_keywords_query_text)
|
6
|
+
= @search_keyword.query
|
7
|
+
%br
|
8
|
+
= link_to t(:search_keywords_change_action_label), edit_search_keyword_path(@search_keyword)
|
9
|
+
|
|
10
|
+
= link_to t(:search_keywords_destroy_action_label), @search_keyword, :confirm => t(:are_you_sure_confirmation), :method => :delete
|
11
|
+
|
|
12
|
+
= link_to t(:search_keywords_back_to_the_list_action_label), search_keywords_path
|
@@ -0,0 +1,22 @@
|
|
1
|
+
= h @article.title
|
2
|
+
%br
|
3
|
+
= !@article.infosource.nil? ? @article.infosource.sourcename : t(:infosources_unknown_source_text)
|
4
|
+
,
|
5
|
+
= @article.published_at
|
6
|
+
,
|
7
|
+
%a{ :href => url_for(@article.url) }
|
8
|
+
= @article.url
|
9
|
+
%br
|
10
|
+
- if @article.author.nil?
|
11
|
+
%br
|
12
|
+
- else
|
13
|
+
= @article.author
|
14
|
+
%br
|
15
|
+
%br
|
16
|
+
= @article.summary.nil? ? '' : Sanitize.clean(@article.summary, {:elements => ['p']})
|
17
|
+
%br
|
18
|
+
%br
|
19
|
+
_ _ _
|
20
|
+
%br
|
21
|
+
%br
|
22
|
+
= @article.body.nil? ? '' : Sanitize.clean(@article.body, {:elements => ['p']})
|
@@ -0,0 +1,28 @@
|
|
1
|
+
- title t(:user_sessions_login_view_title)
|
2
|
+
|
3
|
+
#dialog
|
4
|
+
- form_for @user_session, :url => {:action => "create"} do |form|
|
5
|
+
- unless form.error_messages.empty?
|
6
|
+
%div.errorExplanation#errorExplanation
|
7
|
+
%h2
|
8
|
+
= t(:user_sessions_try_to_login_again)
|
9
|
+
%p
|
10
|
+
= t(:user_sessions_check_your_keyboard)
|
11
|
+
%table
|
12
|
+
%tr
|
13
|
+
%td
|
14
|
+
= form.label :username, t(:user_sessions_username_form_field_label)
|
15
|
+
%td
|
16
|
+
= form.text_field :username
|
17
|
+
%tr
|
18
|
+
%td
|
19
|
+
= form.label :password, t(:user_sessions_password_form_field_label)
|
20
|
+
%td
|
21
|
+
= form.password_field :password
|
22
|
+
%tr
|
23
|
+
%td
|
24
|
+
%td
|
25
|
+
= form.submit t(:user_sessions_login_action_label)
|
26
|
+
|
27
|
+
#content
|
28
|
+
= t(:what_is_indicium_about_text)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#dialog
|
2
|
+
- form_for(@user) do |form|
|
3
|
+
= form.error_messages
|
4
|
+
%table
|
5
|
+
%tr
|
6
|
+
%td
|
7
|
+
= form.label :username, t(:users_username_form_field_label)
|
8
|
+
%td
|
9
|
+
= form.text_field :username
|
10
|
+
%tr
|
11
|
+
%td
|
12
|
+
= form.label :email, t(:users_email_form_field_label)
|
13
|
+
%td
|
14
|
+
= form.text_field :email
|
15
|
+
%tr
|
16
|
+
%td
|
17
|
+
= form.label :password, t(:users_password_from_field_label)
|
18
|
+
%td
|
19
|
+
= form.password_field :password
|
20
|
+
%tr
|
21
|
+
%td
|
22
|
+
= form.label :password_confirmation, t(:users_password_confirmation_label)
|
23
|
+
%td
|
24
|
+
= form.password_field :password_confirmation
|
25
|
+
%tr
|
26
|
+
%td
|
27
|
+
%td
|
28
|
+
= form.submit t(:users_submit_form_action_label)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#dialog
|
2
|
+
= link_to t(:registration_action_label), register_path
|
3
|
+
%br
|
4
|
+
%br
|
5
|
+
= will_paginate @users, {:previous_label => t(:pagination_previous_label), :next_label => t(:pagination_next_label)}
|
6
|
+
- @users.each do |user|
|
7
|
+
= link_to user.username, show_user_path(user.username)
|
8
|
+
= link_to t(:agent_action_label), agent_for_user_path(user.username), :class => 'dialog_item_navigation'
|
9
|
+
%br
|
10
|
+
= will_paginate @users, {:previous_label => t(:pagination_previous_label), :next_label => t(:pagination_next_label)}
|
File without changes
|