xforum 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +139 -0
- data/Rakefile +31 -0
- data/app/assets/images/xforum/addphoto.jpg +0 -0
- data/app/assets/images/xforum/bg-input-focus.png +0 -0
- data/app/assets/images/xforum/internet.png +0 -0
- data/app/assets/images/xforum/silver_selector.png +0 -0
- data/app/assets/javascripts/xforum/application.js +25 -0
- data/app/assets/javascripts/xforum/forum_admin.js.coffee +477 -0
- data/app/assets/javascripts/xforum/forum_basic.js.coffee +321 -0
- data/app/assets/javascripts/xforum/forum_translator.js.coffee +116 -0
- data/app/assets/javascripts/xforum/forum_user.js.coffee +403 -0
- data/app/assets/javascripts/xforum/global_java.js +141 -0
- data/app/assets/javascripts/xforum/help.js.coffee +10 -0
- data/app/assets/stylesheets/xforum/application.css.scss +15 -0
- data/app/assets/stylesheets/xforum/custom.css.scss +295 -0
- data/app/controllers/xforum/application_controller.rb +25 -0
- data/app/controllers/xforum/forums_controller.rb +123 -0
- data/app/helpers/xforum/application_helper.rb +4 -0
- data/app/mailers/xforum/user_mailer.rb +15 -0
- data/app/models/xforum/category.rb +76 -0
- data/app/models/xforum/forum.rb +217 -0
- data/app/models/xforum/hyperlink.rb +42 -0
- data/app/models/xforum/language.rb +104 -0
- data/app/models/xforum/people_list.rb +189 -0
- data/app/models/xforum/photo.rb +60 -0
- data/app/models/xforum/topic.rb +140 -0
- data/app/models/xforum/translation.rb +92 -0
- data/app/views/layouts/xforum/application.html.erb +14 -0
- data/app/views/user_mailer/xforum/note_to_forum_users.html.erb +32 -0
- data/app/views/xforum/forums/_dummy.html.erb +0 -0
- data/app/views/xforum/forums/_forum.html.erb +18 -0
- data/app/views/xforum/forums/_forum_admin.html.erb +139 -0
- data/app/views/xforum/forums/_forum_comments.html.erb +45 -0
- data/app/views/xforum/forums/_forum_entry.html.erb +44 -0
- data/app/views/xforum/forums/_forum_video.html.erb +7 -0
- data/app/views/xforum/forums/newphoto.js.erb +1 -0
- data/app/views/xforum/forums/the_page.html.erb +3 -0
- data/config/intiializers/xforum.rb +2 -0
- data/config/locales/forum.de.yml +93 -0
- data/config/locales/forum.en.yml +96 -0
- data/config/locales/forum.es.yml +94 -0
- data/config/locales/forum.fr.yml +94 -0
- data/config/routes.rb +10 -0
- data/db/migrate/20140600_add_forum_to_users.rb +20 -0
- data/db/migrate/20140601_create_forum_forums.rb +147 -0
- data/db/migrate/20140602_add_restricted_to_category.rb +6 -0
- data/db/migrate/20140602_change_suggestion_default.rb +7 -0
- data/lib/tasks/xforum_tasks.rake +65 -0
- data/lib/xforum.rb +95 -0
- data/lib/xforum/engine.rb +6 -0
- data/lib/xforum/set.yml +209 -0
- data/lib/xforum/user_include.rb +13 -0
- data/lib/xforum/version.rb +3 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +83 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/xforum_test.rb +7 -0
- metadata +327 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
|
|
2
|
+
module Xforum
|
|
3
|
+
class Translation < ActiveRecord::Base
|
|
4
|
+
require 'json'
|
|
5
|
+
belongs_to :forum
|
|
6
|
+
belongs_to :category
|
|
7
|
+
belongs_to :topic
|
|
8
|
+
belongs_to :hyperlink
|
|
9
|
+
|
|
10
|
+
def self.translate_to(list)
|
|
11
|
+
list.each{|entry|
|
|
12
|
+
translations=ForumAssist.named_array(Translation.where(forum_id:entry[:id]).pluck(:language,:content),[:language,:content])
|
|
13
|
+
entry.store(:translations,translations)
|
|
14
|
+
}
|
|
15
|
+
list
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def self.get_localized_forum(language,params)
|
|
19
|
+
return if params.nil?
|
|
20
|
+
plucking=ForumAssist.make_string_list(params[:plucking])
|
|
21
|
+
ordering=ForumAssist.make_string_list(params[:ordering]) unless params[:ordering].nil?
|
|
22
|
+
params[:ordering].nil? ?
|
|
23
|
+
alist=Forum.where(params[:lookup]).pluck(plucking) :
|
|
24
|
+
alist= Forum.where(params[:lookup]).order(ordering).pluck(plucking)
|
|
25
|
+
unless alist.empty?
|
|
26
|
+
indexes=plucking.split(',')
|
|
27
|
+
content=indexes.index('content')
|
|
28
|
+
language_list=Language.where(active:true).order(:code).pluck(:id,:name)
|
|
29
|
+
language_list=ForumAssist.named_array(language_list,[:id,:item])
|
|
30
|
+
if alist.is_a?(Array)
|
|
31
|
+
alist.each { |a_entry|
|
|
32
|
+
entry=ForumAssist.named_array(a_entry,params[:plucking])[0]
|
|
33
|
+
translation = Translation.where(forum_id:entry[:id],language_id:language).pluck(:content)[0] unless language.nil?
|
|
34
|
+
a_entry[content]=translation unless translation.nil?
|
|
35
|
+
full_list=Translation.where(forum_id:entry[:id]).pluck(:language_id)
|
|
36
|
+
a_entry.push(!(full_list.size==language_list.size))
|
|
37
|
+
if language_list.empty?
|
|
38
|
+
a_entry.push(['nothing'])
|
|
39
|
+
else
|
|
40
|
+
this_list=[]
|
|
41
|
+
language_list.each{ |thisone| this_list.push(thisone[:item]) unless full_list.include?(thisone[:id]) }
|
|
42
|
+
a_entry.push(this_list.clone.to_json )
|
|
43
|
+
end
|
|
44
|
+
}
|
|
45
|
+
else
|
|
46
|
+
translation = Translation.where(forum_id:alist[:id],language_id:language).pluck(:content)[0]
|
|
47
|
+
alist[:content]=translation unless translation.nil?
|
|
48
|
+
end
|
|
49
|
+
params[:size] == 0 ? alist[0] : alist
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# noinspection RubyLiteralArrayInspection
|
|
54
|
+
def self.get_translations(params)
|
|
55
|
+
language = Language.get_me(params)
|
|
56
|
+
topic = Topic.where(name:params[:topic]).pluck(:id)[0]
|
|
57
|
+
ForumAssist.named_array(Translation.where(topic_id:topic,language_id:language,state:['new','open']).pluck(:forum_id,:content,:suggestion),[:forum_id,:translation,:suggestion])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def self.add_one(params,topic_id,user_id,forum_id)
|
|
61
|
+
unless params[:translation] == ''
|
|
62
|
+
if PeopleList.check_people({topic:topic_id,list:'moderator',user_id:user_id}) && !Translation.where(language_id:Language.get_me(params),forum_id:params[:id]).nil?
|
|
63
|
+
Translation.where(forum_id:forum_id,topic_id:topic_id, language_id:Language.get_me(params)).update_all(content:params[:translation],suggestion:false,state:'open')
|
|
64
|
+
Translation.where(forum_id:params[:id],topic_id:topic_id,suggestion:true).update_all(state:'closed')
|
|
65
|
+
else
|
|
66
|
+
suggestion = !Translation.where(language_id:Language.get_me(params),forum_id:forum_id).nil?
|
|
67
|
+
Translation.create(forum_id:forum_id,user_id:user_id,topic_id:topic_id, language_id:Language.get_me(params), content:params[:translation],suggestion:suggestion,state:'new')
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def self.translate_list(alist,language,list_name)
|
|
73
|
+
alist.each.each {|entry|
|
|
74
|
+
translation=Translation.find_by(forum_id:entry[:id],language_id:language) unless language.nil?
|
|
75
|
+
case list_name
|
|
76
|
+
when 'category'
|
|
77
|
+
entry.store(:item,Category.where(id:entry[:id]).pluck(:name)[0] )
|
|
78
|
+
entry.store(:value,entry[:item])
|
|
79
|
+
when 'topic'
|
|
80
|
+
entry.store(:item,Topic.where(id:entry[:id]).pluck(:name)[0] )
|
|
81
|
+
entry.store(:value,entry[:item])
|
|
82
|
+
when 'language'
|
|
83
|
+
translation ={content:entry[:value].concat(' - ').concat(entry[:local_name])}
|
|
84
|
+
entry.store(:value,'wait')
|
|
85
|
+
else
|
|
86
|
+
end
|
|
87
|
+
entry[:value]=translation[:content] unless translation.nil?
|
|
88
|
+
}
|
|
89
|
+
alist
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Forum</title>
|
|
5
|
+
<%= stylesheet_link_tag 'forum/application', media: 'all' %>
|
|
6
|
+
<%= javascript_include_tag 'forum/application' %>
|
|
7
|
+
<%= csrf_meta_tags %>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<%= yield %>
|
|
12
|
+
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
|
|
5
|
+
</head>
|
|
6
|
+
<body>
|
|
7
|
+
<div>
|
|
8
|
+
|
|
9
|
+
<img src="https://openstuff.s3.amazonaws.com/pdmlogo2.png" height=80>
|
|
10
|
+
|
|
11
|
+
<h2>'<%= t('forum.from_Forum_Admin')%>'</h2>
|
|
12
|
+
|
|
13
|
+
<br>
|
|
14
|
+
</div>
|
|
15
|
+
<div>
|
|
16
|
+
<%(0...@content.size).each do |i| %>
|
|
17
|
+
<%= @content[i]%>
|
|
18
|
+
<br>
|
|
19
|
+
<%end%>
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<br>
|
|
23
|
+
<br>
|
|
24
|
+
<br>
|
|
25
|
+
Email: <%= link_to('bnaCreations.heroukuapp@heroku.com', 'mailto:bnaCreations@gmail.com', class: 'contact2') %>
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
</body>
|
|
31
|
+
|
|
32
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div id="forum-box" class="col-md-12" >
|
|
2
|
+
<%@categories=[t('xForum.select_category')] %>
|
|
3
|
+
<%@forum_actions=[] %>
|
|
4
|
+
<%@user_tags=[] %>
|
|
5
|
+
<%@user_email=[]%>
|
|
6
|
+
<%@distribution_lists=[] %>
|
|
7
|
+
<%if Xforum::Language.first.nil? then Xforum::Language.init_language_set end %>
|
|
8
|
+
<%unless ENV['XFORUM_LANGUAGES'].nil? then @languages= Xforum::Language.languages({active:'true',list:'forum-language'})[:list_data] end %>
|
|
9
|
+
<%@aphoto= 'photo' %>
|
|
10
|
+
<%@topics=[[t('xForum.select topic'),0] ] %>
|
|
11
|
+
|
|
12
|
+
<%= select_tag(:forum, options_for_select(@categories),id:'forum-category', class: 'forum-select') %>
|
|
13
|
+
<%= select_tag(:forum, options_for_select(@topics), id:'forum-topic', class: 'forum-select') %>
|
|
14
|
+
|
|
15
|
+
<%=render partial: 'xforum/forums/forum_comments'%>
|
|
16
|
+
<%=render partial: 'xforum/forums/forum_admin'%>
|
|
17
|
+
<%=render partial: 'xforum/forums/forum_video'%>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<div class="forum-senate" id="forum-senate-admin-users" style="display: none;">
|
|
2
|
+
|
|
3
|
+
<%@empty= [[t( :empty_list),0 ]] %>
|
|
4
|
+
<div class='forum-row'><br>
|
|
5
|
+
<span class="col-md-3">
|
|
6
|
+
<label> <%= t('xForum.Action')%> </label> <br><br>
|
|
7
|
+
<%=select_tag(:users,options_for_select(@forum_actions ), id:'forum-actions', class:'forum-select')%>
|
|
8
|
+
<input class='red-ellipse comment-btn' type='button' id= "forum-admin-button" name ='forum-act-on-admin-selector' value= "<%= t('xForum.Submit')%>" >
|
|
9
|
+
</span>
|
|
10
|
+
<span class="col-md-3">
|
|
11
|
+
<label> <%= t('xForum.User_Name') %> </label> <br><br>
|
|
12
|
+
|
|
13
|
+
<button class="cool-selector" name="forum-user-tag-show"><input class= 'silver-selector' type='button' id= 'forum-admin-button' name='forum-user-tag-choose' value="<%= t('xForum.select_user')%>"></button>
|
|
14
|
+
<span id='forum-user-tag-span'><%=select_tag(:users,options_for_select(@user_tags ), multiple:true, name:'forum-user-tag',size:6, class:'forum-select')%></span>
|
|
15
|
+
</span>
|
|
16
|
+
<span class="col-md-3">
|
|
17
|
+
<label> <%= t('xForum.User_Email')%> </label> <br><br>
|
|
18
|
+
<button class="cool-selector" name="forum-user-email-show"><input class= 'silver-selector' type='button' id= 'forum-admin-button' name='forum-user-email-choose' value="<%= t('xForum.select_user')%>"></button>
|
|
19
|
+
<span id='forum-user-email-span'><%=select_tag(:user_email,options_for_select(@user_email), multiple:true, size:6, name:'forum-user-email', class:'forum-select')%></span>
|
|
20
|
+
</span>
|
|
21
|
+
<span class="col-md-3">
|
|
22
|
+
<span id="forum-distribution-span">
|
|
23
|
+
<label> <%= t('xForum.Distribuiton_List_Name')%> </label> <br><br>
|
|
24
|
+
<%=select_tag(:forum,options_for_select(@distribution_lists), id:'forum-distribution-lists', class:'forum-select')%>
|
|
25
|
+
<label><%=t('xforum.New')%></label> <input type="text" id='forum-new-distribution-list' class="admin-edit-field" >
|
|
26
|
+
</span>
|
|
27
|
+
<span id="forum-moderator-add-span">
|
|
28
|
+
<label> <%= t('xForum.Add_Topic_Monitor')%> </label> <br><br>
|
|
29
|
+
<%= select_tag(:forum, options_for_select(@categories),id:'forum-category-monitor', class: 'forum-select') %>
|
|
30
|
+
<%= select_tag(:forum, options_for_select(@topics), id:'forum-topic-monitor', class: 'forum-select') %>
|
|
31
|
+
</span>
|
|
32
|
+
</span>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<div id= 'forum-email-email' class="forum-row" style="display: none;">
|
|
37
|
+
<input type="text" id="forum-email-subject" class="forum-email-subject" placeholder="<%= t('xForum.subject')%>" >
|
|
38
|
+
<textarea id="forum-email-body" class="forum-email-body" placeholder="<%= t('xForum.message')%>" ></textarea>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="forum-senate" id="forum-senate-admin-lists" style="display: none;">
|
|
42
|
+
<%@categories.pop%>
|
|
43
|
+
<%@categories2=@categories.clone%>
|
|
44
|
+
<%@categories2.pop%>
|
|
45
|
+
<%= select_tag(:forum, options_for_select(@categories2),id:'forum-category-admin', class: 'forum-select') %>
|
|
46
|
+
<%= select_tag(:forum, options_for_select(@topics),id:'forum-admin-topic', class: 'forum-select') %>
|
|
47
|
+
|
|
48
|
+
<%=select_tag(:forum,options_for_select(@distribution_lists), id:'forum-restricted-list', class:'forum-select')%>
|
|
49
|
+
<div class="forum-row senate-row">
|
|
50
|
+
<div id= 'forum-category-set' class="col-md-4">
|
|
51
|
+
<ul id= 'forum-admins-category-list'>
|
|
52
|
+
<li>
|
|
53
|
+
<input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object'
|
|
54
|
+
data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
|
|
55
|
+
<input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object'
|
|
56
|
+
data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
|
|
57
|
+
<span></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" ></span>
|
|
58
|
+
</li>
|
|
59
|
+
</ul>
|
|
60
|
+
<span id="forum-add-category-input-span" hidden><input id='forum-add-admin-category' type="text" class="admin-edit-field" ></span> <br>
|
|
61
|
+
<input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-category'
|
|
62
|
+
data-state='add' data-add= "<%= t('xForum.Add_Category')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Category')%>" >
|
|
63
|
+
<input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-category'
|
|
64
|
+
data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
|
|
65
|
+
<input class='red-ellipse comment-btn' type="button" id="restrict-category" data-submit= "<%=t('xForum.Submit')%>" data-restrict="<%=t('xForum.Restrict')%>" value="<%=t('xForum.Restrict')%>">
|
|
66
|
+
<input class='red-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-cancel'
|
|
67
|
+
data-who='category' value= "<%= t('xForum.Cancel')%>" >
|
|
68
|
+
<ul id="forum-category-prososals-list" >
|
|
69
|
+
<li>
|
|
70
|
+
<input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response'
|
|
71
|
+
data-action='accept' value= "<%= t('xForum.Accept')%>" >
|
|
72
|
+
<input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response'
|
|
73
|
+
data-action='reject' value= "<%= t('xForum.Reject')%>" >
|
|
74
|
+
<span data-type="item"></span><span data-type="user"></span>
|
|
75
|
+
</li>
|
|
76
|
+
</ul>
|
|
77
|
+
</div>
|
|
78
|
+
<div id= 'forum-topic-set' class="col-md-5">
|
|
79
|
+
<ul id="forum-admins-topic-list">
|
|
80
|
+
<li>
|
|
81
|
+
<input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object'
|
|
82
|
+
data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
|
|
83
|
+
<input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object'
|
|
84
|
+
data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
|
|
85
|
+
<span></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" ></span>
|
|
86
|
+
</li>
|
|
87
|
+
</ul>
|
|
88
|
+
<span id="forum-add-topic-input-span" hidden><input id='forum-add-admin-topic' type="text" class="admin-edit-field" ></span><br>
|
|
89
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-topic'
|
|
90
|
+
data-state='add' data-add= "<%= t('xForum.Add_Topic')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Topic')%>" >
|
|
91
|
+
<input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-topic'
|
|
92
|
+
data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
|
|
93
|
+
<input class='red-ellipse comment-btn' type="button" id="restrict-topic" data-submit= "<%=t('xForum.Submit')%>" data-restrict="<%=t('xForum.Restrict')%>" value="<%=t('xForum.Restrict')%>">
|
|
94
|
+
|
|
95
|
+
<input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel'
|
|
96
|
+
data-who='topic' value= "<%= t('xForum.Cancel')%>" >
|
|
97
|
+
<ul id="forum-topic-prososals-list" >
|
|
98
|
+
<li>
|
|
99
|
+
<input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response'
|
|
100
|
+
data-action='accept' value= "<%= t('xForum.Accept')%>" >
|
|
101
|
+
<input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response'
|
|
102
|
+
data-action='reject' value= "<%= t('xForum.Reject')%>" >
|
|
103
|
+
<span data-type="item"></span><span data-type='user'></span><span data-type="category"></span>
|
|
104
|
+
</li>
|
|
105
|
+
</ul>
|
|
106
|
+
</div>
|
|
107
|
+
<div id= 'forum-language-set' class="col-md-3">
|
|
108
|
+
<span id="forum-add-language-input-span" hidden>
|
|
109
|
+
<label><%= t('xForum.Language_Name')%> </label>
|
|
110
|
+
<input id='forum-add-admin-language' type="text" class="admin-edit-field" >
|
|
111
|
+
<label><%= t('xForum.Localized_Name') %></label>
|
|
112
|
+
<input id='forum-add-admin-language-localized' type="text" class="admin-edit-field" >
|
|
113
|
+
<label><%= t('xForum.Language_code') %></label>
|
|
114
|
+
<input id='forum-add-admin-language-code' type="text" class="admin-edit-field" >
|
|
115
|
+
</span><br>
|
|
116
|
+
|
|
117
|
+
<span id="language-selector-span" hidden>
|
|
118
|
+
<%=select_tag(:users,options_for_select([t('xForum.Select_Language')] ), id:'forum-admin-language-select', class:'forum-select')%><br>
|
|
119
|
+
</span>
|
|
120
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-activate-language' value= "<%= t('xForum.Activate')%>" >
|
|
121
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-deactivate-language' value= "<%= t('xForum.Deactivate')%>" >
|
|
122
|
+
<br>
|
|
123
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-add-language'
|
|
124
|
+
data-state='add' data-add= "<%= t('xForum.Add_Language')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Language')%>" >
|
|
125
|
+
<input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel' data-who='language' value= "<%= t('xForum.Cancel')%>" >
|
|
126
|
+
|
|
127
|
+
<ul id="forum-language-prososals-list" >
|
|
128
|
+
<li>
|
|
129
|
+
<input class='blue-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response' value= "<%= t('xForum.Close')%>" >
|
|
130
|
+
<span></span>
|
|
131
|
+
<span data-type="language"></span><span></span>
|
|
132
|
+
</li>
|
|
133
|
+
</ul>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<span id="forum-voting-booth" hidden>
|
|
2
|
+
<button class='forum-vote-up' type='button' id= 'forum-vote' name='up'>
|
|
3
|
+
<span class="glyphicon glyphicon-chevron-up"></span>
|
|
4
|
+
</button>
|
|
5
|
+
<button type="button" class="vote-green" id='forum-vote-count' value="vote"></button>
|
|
6
|
+
<button class='forum-vote-down' type='button' id= 'forum-vote' name='down'>
|
|
7
|
+
<span class="glyphicon glyphicon-chevron-down"></span>
|
|
8
|
+
</button>
|
|
9
|
+
</span>
|
|
10
|
+
<span id= 'subscribe-forum' hidden> <input class='blue-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-subscribe' value= "<%= t('xForum.Subscribe')%>" ></span>
|
|
11
|
+
<span id= 'unsubscribe-forum' hidden> <input class='red-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-unsubscribe' value= "<%= t('xForum.Unsubscribe')%>" ></span>
|
|
12
|
+
<span id= 'review-forum-span' hidden>
|
|
13
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'review-forum' data-state='done' data-done= "<%= t('xForum.Done')%>" data-review= "<%= t('xForum.Review')%>" value= "<%= t('xForum.Review')%>" >
|
|
14
|
+
<span id='forum-review-buttons' hidden>
|
|
15
|
+
<input class='green-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-accept-rest' value= "<%= t('xForum.Accept_Rest')%>" >
|
|
16
|
+
<input class='red-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-reject-rest' value= "<%= t('xForum.Reject_Rest')%>" >
|
|
17
|
+
</span></span>
|
|
18
|
+
<span id="forum-senate-admin">
|
|
19
|
+
<span hidden> <input type="text" id="forum-add-admin-user" class="admin-edit-field" value="'me" ></span>
|
|
20
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-admin-views' data-view= 'lists' value= "<%= t('xForum.Lists')%>" >
|
|
21
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-admin-views' data-view= 'users' value= "<%= t('xForum.Users')%>" >
|
|
22
|
+
</span>
|
|
23
|
+
<span><input class='red-ellipse comment-btn right' type='button' id= 'close-forum' value= "<%= t('xForum.Close')%>" > </span>
|
|
24
|
+
<%unless @languages.nil? %><%= select_tag(:forum, options_for_select(@languages), id:'forum-language',class: 'forum-select right pad-10R') %> <%end%>
|
|
25
|
+
|
|
26
|
+
<div class= 'new-thing' id="forum-add-new-thing-span" style="display: none;" >
|
|
27
|
+
<input id="forum-suggestion" class="new-thing">
|
|
28
|
+
<input class='green-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-add-suggestion-submit' value= "<%= t('xForum.Submit')%>" >
|
|
29
|
+
</div>
|
|
30
|
+
<span id="forum-dummy-box"></span>
|
|
31
|
+
<div id="forum-photo-upload " style="display: none;">
|
|
32
|
+
<%= form_for @aphoto, url: 'xforum/photos', html:{id: 'my-forum-photo', name:'hello'}, remote:true do |f| %>
|
|
33
|
+
<span >
|
|
34
|
+
<%= csrf_meta_tags %>
|
|
35
|
+
<% @form=f %>
|
|
36
|
+
<label for="upload_file">Select File</label>
|
|
37
|
+
<%= f.text_area :data %>
|
|
38
|
+
<%= f.file_field :file, multiple: true %>
|
|
39
|
+
</span>
|
|
40
|
+
<%end%>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="forum-senate" id='forum-senate'>
|
|
44
|
+
<%=render partial: 'xforum/forums/forum_entry'%>
|
|
45
|
+
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div id=forum-comment-span class="comment-new-span">
|
|
2
|
+
<input class='green-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-post-it' value= "<%= t('xForum.Post')%>" >
|
|
3
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-edit-comment' value= "<%= t('xForum.Edit')%>" >
|
|
4
|
+
<input class='red-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-restrict-comment' data-unrestrict= "<%= t('xForum.Unrestrict')%>" data-restrict= "<%= t('xForum.Restrict')%>" value='<%= t('xForum.Restrict')%>' >
|
|
5
|
+
<input class='red-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-invite-comment' value= "<%= t('xForum.invite')%>" >
|
|
6
|
+
<input class='green-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-accept-comment' value= "<%= t('xForum.Accept')%>" >
|
|
7
|
+
<input class='red-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'forum-reject-comment' value= "<%= t('xForum.Reject')%>" >
|
|
8
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'add-forum-voting' value= "<%= t('xForum.Add_Voting')%>" >
|
|
9
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-user-button' name= 'add-forum-translation' value= "<%= t('xForum.Translate')%>" >
|
|
10
|
+
|
|
11
|
+
<%= image_tag('xforum/internet.png',class: 'forum-add-internet', id:'forum-add-hyperlink') %>
|
|
12
|
+
<%= image_tag('xforum/addphoto.jpg', class: 'forum-add-photo', id: 'forum-add-photo') %> <br>
|
|
13
|
+
<%= text_area_tag 'forum-comment',nil, rows:3, class:'senate-new'%>
|
|
14
|
+
<input class='red-ellipse comment-btn right' type='button' id= 'forum-user-button' name= 'forum-cancel-comment' value= "<%= t('xForum.Cancel')%>" >
|
|
15
|
+
<span id="forum-invitation-span" hidden>
|
|
16
|
+
<label><%= t('xForum.Invitation_list')%></label>
|
|
17
|
+
<input type="text" class="admin-edit-field" id= "forum-invite-list">
|
|
18
|
+
</span>
|
|
19
|
+
<span id="forum-add-hyperlink-span">
|
|
20
|
+
<label><%= t('xForum.Hyperlink')%></label>
|
|
21
|
+
<label>URL</label>
|
|
22
|
+
<input type="text" class="admin-edit-field" id= "forum-hyperlink-address">
|
|
23
|
+
<label><%= t('xForum.Text')%></label>
|
|
24
|
+
<input type="text" class="admin-edit-field" id= "forum-hyperlink-text">
|
|
25
|
+
<input class='blue-ellipse comment-btn' type='button' id= 'forum-create-hyperlink' value= "<%= t('xForum.Create')%>" >
|
|
26
|
+
</span>
|
|
27
|
+
<span id="forum-translate-hyperlink-span">
|
|
28
|
+
</span>
|
|
29
|
+
<span id="forum-translation-span" class="forum-translation-span" hidden>
|
|
30
|
+
<label id="choice-label "><%= t('xForum.Translation')%></label>
|
|
31
|
+
<span class="btn-group">
|
|
32
|
+
<%@select_language= [t('xForum.select_translation_language') ]%>
|
|
33
|
+
<%= select_tag(:forum, options_for_select(@select_language), id:'forum-translation-language',class: 'forum-select right pad-10R') %>
|
|
34
|
+
|
|
35
|
+
<ul id='forum-translation-choices' class="dropdown-menu">
|
|
36
|
+
|
|
37
|
+
</ul>
|
|
38
|
+
</span>
|
|
39
|
+
<div id="forum-translation-scroll" class="forum-translation-scroll">
|
|
40
|
+
<%= text_area_tag 'forum-comment-translation',nil, rows:3, class:'senate-new' %>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
</span>
|
|
44
|
+
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<div id="forum-senate-video" style="display: none;">
|
|
2
|
+
<div>
|
|
3
|
+
<input class='red-ellipse comment-btn' type='button' id= 'forum-video-back' value= "<%= t('xForum.Back')%>" >
|
|
4
|
+
<input class='green-ellipse comment-btn' type='button' id= 'forum-video-replay' value= "<%= t('xForum.Replay')%>" >
|
|
5
|
+
</div>
|
|
6
|
+
<%=image_tag('',id:'big-forum-photo', class:'biggest-forum-photo') %>
|
|
7
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$("#forum-dummy-box").html('<%= escape_javascript(render partial: 'shared/dummy' )%>');
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
|
3
|
+
# than English, add the necessary files in this directory.
|
|
4
|
+
#
|
|
5
|
+
# To use the locales, use `I18n.t`:
|
|
6
|
+
#
|
|
7
|
+
# I18n.t 'hello'
|
|
8
|
+
#
|
|
9
|
+
# In views, this is aliased to just `t`:
|
|
10
|
+
#
|
|
11
|
+
# <%= t('hello') %>
|
|
12
|
+
#
|
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
|
14
|
+
#
|
|
15
|
+
# I18n.locale = :es
|
|
16
|
+
#
|
|
17
|
+
# This would use the information in config/locales/es.yml.
|
|
18
|
+
#
|
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
|
21
|
+
|
|
22
|
+
de:
|
|
23
|
+
xForum:
|
|
24
|
+
Add_Topic: Thema hinzufügen
|
|
25
|
+
Add_Language: Sprache hinzufügen
|
|
26
|
+
Cancel: stornieren
|
|
27
|
+
Close: in der Nähe
|
|
28
|
+
open: offen
|
|
29
|
+
Save: sparen
|
|
30
|
+
Subscribe: zeichnen
|
|
31
|
+
Unsubscribe: Abmelden
|
|
32
|
+
Users: Benutzer
|
|
33
|
+
Lists: Listen
|
|
34
|
+
save: sparen
|
|
35
|
+
translate: übersetzen
|
|
36
|
+
Translate: übersetzen
|
|
37
|
+
Done: Fertig
|
|
38
|
+
Localized_Name: Lokalisierte Namen
|
|
39
|
+
Language_Name: Name der Sprache
|
|
40
|
+
Distribuiton_List_Name: Verteilerlistenname
|
|
41
|
+
User_Name: Benutzername
|
|
42
|
+
User_Email: Benutzer E-Mail
|
|
43
|
+
Activate: aktivieren
|
|
44
|
+
Deactivate: deaktivieren
|
|
45
|
+
Select_Language: Sprache wählen
|
|
46
|
+
Language_code: Sprachcode
|
|
47
|
+
Vote: abstimmen
|
|
48
|
+
Review: Rezension
|
|
49
|
+
Accept_Rest: akzeptieren Erholung
|
|
50
|
+
Reject_Rest: Ablehnen Erholung
|
|
51
|
+
Lists: Listen
|
|
52
|
+
Users: Benutzer
|
|
53
|
+
Submit: einreichen
|
|
54
|
+
Post: Beitrag
|
|
55
|
+
Edit: Bearbeiten
|
|
56
|
+
Restrict: beschränken
|
|
57
|
+
Unrestrict: Unrestrict
|
|
58
|
+
invite: laden
|
|
59
|
+
Accept: akzeptieren
|
|
60
|
+
Reject: ablehnen
|
|
61
|
+
Add_Voting: Voting hinzufügen
|
|
62
|
+
del: del
|
|
63
|
+
Add_Category: Kategorie
|
|
64
|
+
edit: bearbeiten
|
|
65
|
+
Continue: fortsetzen
|
|
66
|
+
empty_list: leere Liste
|
|
67
|
+
select_language: Sprache wählen
|
|
68
|
+
suspend_posting: auszusetzen Beitrag
|
|
69
|
+
suspend_all: aussetzen alle
|
|
70
|
+
email_to: E-Mail an
|
|
71
|
+
create_distribution: erstellen Verteilung
|
|
72
|
+
add_to_distribution: in den Vertrieb
|
|
73
|
+
select_action: Aktion auswählen
|
|
74
|
+
select_none: wählen Sie keine
|
|
75
|
+
select_list: Liste auswählen
|
|
76
|
+
select_user: Benutzer wählen
|
|
77
|
+
send_email_to: schicken Sie diese an
|
|
78
|
+
subject: Thema
|
|
79
|
+
message: Nachricht
|
|
80
|
+
Forum: Forum
|
|
81
|
+
Admin_name: Admin
|
|
82
|
+
from_Forum_Admin: Eine Nachricht von Ihrem Forum Admin
|
|
83
|
+
Translation: Übersetzung
|
|
84
|
+
Add_Topic_Monitor: In Topic -Monitor
|
|
85
|
+
Invitation_list: Einladung Liste
|
|
86
|
+
Create: schaffen
|
|
87
|
+
Hyperlink: Hyperlink
|
|
88
|
+
Text: Text
|
|
89
|
+
select_translation_language: Übersetzung wählen Sprache
|
|
90
|
+
select_topic: Thema wählen
|
|
91
|
+
select_category: Kategorie auswählen
|
|
92
|
+
Replay: Wiederholung
|
|
93
|
+
Back: Zurück
|