xforum 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc117ec03d67331b03463b23ad6bd5f7a497e442
4
- data.tar.gz: 9ea7c11c3b567a1af0265c3c08d13dc51facb1f8
3
+ metadata.gz: cdd0230f71f4e32de2c94631d9b231693b29e0c5
4
+ data.tar.gz: 7e68d7226e5fafd6be92b7e51ff070564791c7e2
5
5
  SHA512:
6
- metadata.gz: f5e609daa43c2f2ea42740b402dc8ab08de6623397426bb81abc4fc87aba334323643cb28756f970c8dbb460dc47b0f69abec8f8f299843a7478b7c7e7a29140
7
- data.tar.gz: a6251e7c28d92c1785df25b1d92fa7842bfb78a74caca2bcc9ef31eb7e32c4f1fe2177f5cfb445d789ba149d5a3d06b5fa5ddc18f12247a4b48c1172aa28490f
6
+ metadata.gz: 52c33aed52b5a3ebd4a977e2d402011626e296eba5e2a4ba17707433117ef475038681bf7b7d4d7ea0e13ea0e9f616bc5a20ef7254a301603a9326d029cd72a4
7
+ data.tar.gz: 13df5290aba493ab14f34015b3347aea64190d11e352b233bdc10f3c3d856f68584badb4fea91ad237588908ce37c4dd5ee3232ee30f466a0963dbd40220c51c
@@ -20,8 +20,8 @@ jQuery ->
20
20
  $('#forum-box').delegate 'input[id = forum-admin-button]','click', (evt) ->
21
21
  doButtonAction(event.target)
22
22
  event.stopPropagation()
23
- $('#forum-senate-admin-users').delegate 'option[id = forum-admin-option]','click', (evt) ->
24
- checkForNone(event.target)
23
+ $('#forum-senate-admin-users').delegate '[id = forum-admin-list-option]','click', (evt) ->
24
+ setSelections(event.target)
25
25
  $('#forum-category-admin').change ->
26
26
  getAdminsTopic()
27
27
  $('#forum-actions').change ->
@@ -142,11 +142,18 @@ turnLanguage=(toggle)->
142
142
  showMe({id:'language-selector-span'})
143
143
  $.post('xforum/forum_ajax',{function:'get language set',list:'forum-admin-language-select',active:toggle =='off'},loadList)
144
144
 
145
- checkForNone = (which)->
145
+ setSelections = (which)->
146
146
  if which.value == 'select none'
147
147
  hideMe({obj:which.parentNode.parentNode})
148
148
  name=which.parentNode.name + '-show'
149
149
  showMe({name:name})
150
+ selections = getSelectValues({name:'forum-user-tag',ref:true})
151
+ selections= selections.concat(getSelectValues({name:'forum-user-email',ref:true}))
152
+ selector= $('[name=forum-email-selections]')
153
+ selector.children().remove()
154
+ for i in [0...selections.length]
155
+ unless selections[i]=='select none'
156
+ pushOption(selector,{value:selections[i]})
150
157
 
151
158
  setEmailView = ->
152
159
  blockMe({id:'forum-user-email-span'})
@@ -121,10 +121,15 @@ window.loadList = (params)->
121
121
  window.pushOption = (q_selector,data,offset)->
122
122
  selector=q_selector.get()[0]
123
123
  if selector?
124
- option = document.createElement("option")
125
- option.text = data.value
124
+ switch selector.tagName
125
+ when 'UL'
126
+ option= document.createElement('li')
127
+ option.innerHTML=data.value
128
+ when 'SELECT'
129
+ option = document.createElement("option")
130
+ option.text = data.value
126
131
  option.value = data.item
127
- option.id = 'forum-admin-option'
132
+ option.id = 'forum-admin-list-option'
128
133
  ref = selector.children[selector.children.length - offset]
129
134
  if ref==undefined
130
135
  selector.appendChild(option)
@@ -133,7 +138,6 @@ window.pushOption = (q_selector,data,offset)->
133
138
  else
134
139
  alert "#{q_selector} is not there"
135
140
 
136
-
137
141
  window.getLanguage = ->
138
142
  getSelectValues({id:'forum-language', ref:true})
139
143
 
@@ -13,6 +13,12 @@ $blue: #a0a0ff;
13
13
  .row{
14
14
  width: 100%
15
15
  }
16
+ .forum-admin-user-list{
17
+ width:auto;
18
+ max-height:60px;
19
+ padding:7px;
20
+ overflow-y:scroll;
21
+ }
16
22
  .admin-edit-field{
17
23
  width:150px;
18
24
  font-size: 10px;
@@ -1,25 +1,6 @@
1
1
  module Xforum
2
2
  class ApplicationController < ActionController::Base
3
3
 
4
- include ApplicationHelper
5
- #before_filter :set_locale
6
- # Prevent CSRF attacks by raising an exception.
7
- # For APIs, you may want to use :null_session instead.
8
- protect_from_forgery with: :exception
9
- # Force signout to prevent CSRF attacks
10
-
11
- def handle_unverified_request
12
- sign_out
13
- super
14
- end
15
-
16
- private
17
- def set_locale
18
- I18n.locale = params[:locale] if params[:locale].present?
19
- end
20
- def default_url_options(options = {})
21
- {locale: I18n.locale}
22
- end
23
4
  end
24
5
 
25
6
  end
@@ -132,7 +132,7 @@ module Xforum
132
132
  senate_list[index].store(:moderator,options[:moderator]) unless options[:moderator].nil?
133
133
  senate_list[index].store(:vote,options[:vote]) unless options[:vote].nil?
134
134
  senate_list[index].store(:votes,options[:votes]) unless options[:votes].nil?
135
- senate_list[index].store(:admin,options[:admin]) unless options[:admin].nil?
135
+ senate_list[index].store(:admin_lists,options[:admin_lists]) unless options[:admin_lists].nil?
136
136
  senate_list[index].store(:subscribed,options[:subscribed]) unless options[:subscribed].nil?
137
137
  new_list.push(senate_list[index])
138
138
  id=senate_list[index][:id]
@@ -42,12 +42,10 @@ module Xforum
42
42
  list.people=params[:people].to_json
43
43
  }
44
44
  when 'add to distribution'
45
- alist=user_ids+JSON.load(PeopleList.where(id: params[:distribution_list]).pluck(:people)[0])
46
- alist.uniq!
47
- PeopleList.where(id: params[:distribution_list]).update_all(people: alist.to_json)
48
- when 'remove from distro'
49
- alist=JSON.load(PeopleList.where(id: params[:distribution_list]).pluck(:people)[0])-user_ids
50
- PeopleList.where(id: params[:distribution_list]).update_all(people: alist.to_json)
45
+ alist= user_ids
46
+ blist= JSON.load(PeopleList.where(id: params[:distribution_list]).pluck(:people)[0])
47
+ clist=(alist|blist)-(alist&blist)
48
+ PeopleList.where(id: params[:distribution_list]).update_all(people: clist.to_json)
51
49
  else
52
50
  end
53
51
  end
@@ -22,7 +22,7 @@ module Xforum
22
22
 
23
23
  def self.translate_to(list)
24
24
  list.each{|entry|
25
- translations=AssitMe.named_array(Translation.where(forum_id:entry[:id]).pluck(:language,:content),[:language,:content])
25
+ translations=Translation.grab({forum_id:entry[:id]},[:language,:content],{})
26
26
  entry.store(:translations,translations)
27
27
  }
28
28
  list
@@ -67,8 +67,8 @@ module Xforum
67
67
  def self.get_translations(params)
68
68
  language_id = Language.get_me(params)
69
69
  topic_id = Topic.where(name:params[:topic]).pluck(:id)[0]
70
- ForumAssist.named_array(Translation.where(topic_id:topic_id,language_id:language_id,state:['new','open']).pluck(:forum_id,:content,:suggestion),[:forum_id,:item,:suggestion])
71
- #Translation.grab({topic_id:topic_id,language_id:language_id,state:['new','open']},[:forum_id,:item,:suggestion],{swap:{name: :item}})
70
+ #ForumAssist.named_array(Translation.where(topic_id:topic_id,language_id:language_id,state:['new','open']).pluck(:forum_id,:content,:suggestion),[:forum_id,:item,:suggestion])
71
+ Translation.grab({topic_id:topic_id,language_id:language_id,state:['new','open']},[:forum_id,:content,:suggestion],{swap:{content: :item}})
72
72
 
73
73
  end
74
74
 
@@ -0,0 +1,28 @@
1
+ <div id= 'forum-category-set' class="col-md-4">
2
+ <ul id= 'forum-admins-category-list'>
3
+ <li>
4
+ <input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object'
5
+ data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
6
+ <input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object'
7
+ data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
8
+ <span></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" ></span>
9
+ </li>
10
+ </ul>
11
+ <span id="forum-add-category-input-span" hidden><input id='forum-add-admin-category' type="text" class="admin-edit-field" ></span> <br>
12
+ <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-category'
13
+ data-state='add' data-add= "<%= t('xForum.Add_Category')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Category')%>" >
14
+ <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-category'
15
+ data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
16
+ <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')%>">
17
+ <input class='red-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-cancel'
18
+ data-who='category' value= "<%= t('xForum.Cancel')%>" >
19
+ <ul id="forum-category-prososals-list" >
20
+ <li>
21
+ <input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response'
22
+ data-action='accept' value= "<%= t('xForum.Accept')%>" >
23
+ <input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response'
24
+ data-action='reject' value= "<%= t('xForum.Reject')%>" >
25
+ <span data-type="item"></span><span data-type="user"></span>
26
+ </li>
27
+ </ul>
28
+ </div>
@@ -0,0 +1,28 @@
1
+ <div id= 'forum-language-set' class="col-md-3">
2
+ <span id="forum-add-language-input-span" hidden>
3
+ <label><%= t('xForum.Language_Name')%> </label>
4
+ <input id='forum-add-admin-language' type="text" class="admin-edit-field" >
5
+ <label><%= t('xForum.Localized_Name') %></label>
6
+ <input id='forum-add-admin-language-localized' type="text" class="admin-edit-field" >
7
+ <label><%= t('xForum.Language_code') %></label>
8
+ <input id='forum-add-admin-language-code' type="text" class="admin-edit-field" >
9
+ </span><br>
10
+
11
+ <span id="language-selector-span" hidden>
12
+ <%=select_tag(:users,options_for_select([t('xForum.Select_Language')] ), id:'forum-admin-language-select', class:'forum-select')%><br>
13
+ </span>
14
+ <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-activate-language' value= "<%= t('xForum.Activate')%>" >
15
+ <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-deactivate-language' value= "<%= t('xForum.Deactivate')%>" >
16
+ <br>
17
+ <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-add-language'
18
+ data-state='add' data-add= "<%= t('xForum.Add_Language')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Language')%>" >
19
+ <input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel' data-who='language' value= "<%= t('xForum.Cancel')%>" >
20
+
21
+ <ul id="forum-language-prososals-list" >
22
+ <li>
23
+ <input class='blue-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response' value= "<%= t('xForum.Close')%>" >
24
+ <span></span>
25
+ <span data-type="language"></span><span></span>
26
+ </li>
27
+ </ul>
28
+ </div>
@@ -0,0 +1,29 @@
1
+ <div id= 'forum-topic-set' class="col-md-5">
2
+ <ul id="forum-admins-topic-list">
3
+ <li>
4
+ <input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object'
5
+ data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
6
+ <input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object'
7
+ data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
8
+ <span></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" ></span>
9
+ </li>
10
+ </ul>
11
+ <span id="forum-add-topic-input-span" hidden><input id='forum-add-admin-topic' type="text" class="admin-edit-field" ></span><br>
12
+ <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-topic'
13
+ data-state='add' data-add= "<%= t('xForum.Add_Topic')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Topic')%>" >
14
+ <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-topic'
15
+ data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
16
+ <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')%>">
17
+
18
+ <input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel'
19
+ data-who='topic' value= "<%= t('xForum.Cancel')%>" >
20
+ <ul id="forum-topic-prososals-list" >
21
+ <li>
22
+ <input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response'
23
+ data-action='accept' value= "<%= t('xForum.Accept')%>" >
24
+ <input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response'
25
+ data-action='reject' value= "<%= t('xForum.Reject')%>" >
26
+ <span data-type="item"></span><span data-type='user'></span><span data-type="category"></span>
27
+ </li>
28
+ </ul>
29
+ </div>
@@ -0,0 +1,40 @@
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 id="forum-email-selections" class="forum-admin-user-list"><br><ul name="forum-email-selections"></ul></span>
10
+
11
+ </span>
12
+ <span class="col-md-3">
13
+ <label> <%= t('xForum.User_Name') %> </label> <br><br>
14
+ <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>
15
+ <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>
16
+ </span>
17
+ <span class="col-md-3">
18
+ <label> <%= t('xForum.User_Email')%> </label> <br><br>
19
+ <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>
20
+ <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>
21
+ </span>
22
+ <span class="col-md-3">
23
+ <span id="forum-distribution-span">
24
+ <label> <%= t('xForum.Distribuiton_List_Name')%> </label> <br><br>
25
+ <%=select_tag(:forum,options_for_select(@distribution_lists), id:'forum-distribution-lists', class:'forum-select')%>
26
+ <label><%=t('xforum.New')%></label> <input type="text" id='forum-new-distribution-list' class="admin-edit-field" >
27
+ </span>
28
+ <span id="forum-moderator-add-span">
29
+ <label> <%= t('xForum.Add_Topic_Monitor')%> </label> <br><br>
30
+ <%= select_tag(:forum, options_for_select(@categories),id:'forum-category-monitor', class: 'forum-select') %>
31
+ <%= select_tag(:forum, options_for_select(@topics), id:'forum-topic-monitor', class: 'forum-select') %>
32
+ </span>
33
+ </span>
34
+ </div>
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,5 +41,5 @@
41
41
  </div>
42
42
 
43
43
  <div class="forum-senate" id='forum-senate'>
44
- <%=render partial: 'xforum/forums/forum_entry'%>
44
+ <%=render partial: 'xforum/comments/forum_entry'%>
45
45
  </div>
@@ -12,7 +12,7 @@
12
12
  <%= select_tag(:forum, options_for_select(@categories),id:'forum-category', class: 'forum-select') %>
13
13
  <%= select_tag(:forum, options_for_select(@topics), id:'forum-topic', class: 'forum-select') %>
14
14
 
15
- <%=render partial: 'xforum/forums/forum_comments'%>
15
+ <%=render partial: 'xforum/comments/forum_comments'%>
16
16
  <%=render partial: 'xforum/forums/forum_admin'%>
17
- <%=render partial: 'xforum/forums/forum_video'%>
17
+ <%=render partial: 'xforum/comments/forum_video'%>
18
18
  </div>
@@ -1,137 +1,16 @@
1
- <div class="forum-senate" id="forum-senate-admin-users" style="display: none;">
1
+ <%=render partial: 'xforum/admin_users/admin_users'%>
2
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
3
  <div class="forum-senate" id="forum-senate-admin-lists" style="display: none;">
42
4
  <%@categories.pop%>
43
5
  <%@categories2=@categories.clone%>
44
6
  <%@categories2.pop%>
45
7
  <%= select_tag(:forum, options_for_select(@categories2),id:'forum-category-admin', class: 'forum-select') %>
46
8
  <%= select_tag(:forum, options_for_select(@topics),id:'forum-admin-topic', class: 'forum-select') %>
47
-
48
9
  <%=select_tag(:forum,options_for_select(@distribution_lists), id:'forum-restricted-list', class:'forum-select')%>
49
10
  <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>
11
+ <%=render partial: 'xforum/admin_lists/category_set'%>
12
+ <%=render partial: 'xforum/admin_lists/topic_set'%>
13
+ <%=render partial: 'xforum/admin_lists/language_set'%>
135
14
  </div>
136
15
  </div>
137
16
 
@@ -56,7 +56,6 @@ module ActiveRecordExtension
56
56
  datax=data[i]
57
57
  (0...what.size).each { |j|
58
58
  pseudo ? temp[i].store(what[j], data[j]) : temp[i].store(what[j], datax[j]) }
59
- Rails.logger.debug 'hello'
60
59
  }
61
60
  temp.shift if double
62
61
  temp
@@ -58,7 +58,6 @@
58
58
  datax=data[i]
59
59
  (0...params.size).each { |j|
60
60
  pseudo ? temp[i].store(params[j], data[j]) : temp[i].store(params[j], datax[j]) }
61
- Rails.logger.debug 'hello'
62
61
  }
63
62
  temp.shift if double
64
63
  temp
@@ -31,7 +31,6 @@ module Xforum
31
31
  datax=data[i]
32
32
  (0...params.size).each { |j|
33
33
  pseudo ? temp[i].store(params[j], data[j]) : temp[i].store(params[j], datax[j]) }
34
- Rails.logger.debug 'hello'
35
34
  }
36
35
  temp.shift if double
37
36
  temp
@@ -1,3 +1,3 @@
1
1
  module Xforum
2
- VERSION = '0.0.24'
2
+ VERSION = '0.0.25'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xforum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert D Blanton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-21 00:00:00.000000000 Z
11
+ date: 2014-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -191,7 +191,6 @@ files:
191
191
  - app/controllers/xforum/application_controller.rb
192
192
  - app/controllers/xforum/forums_controller.rb
193
193
  - app/helpers/xforum/application_helper.rb
194
- - app/mailers/xforum/user_mailer.rb
195
194
  - app/models/xforum/category.rb
196
195
  - app/models/xforum/forum.rb
197
196
  - app/models/xforum/hyperlink.rb
@@ -202,12 +201,16 @@ files:
202
201
  - app/models/xforum/translation.rb
203
202
  - app/views/layouts/xforum/application.html.erb
204
203
  - app/views/user_mailer/xforum/note_to_forum_users.html.erb
204
+ - app/views/xforum/admin_lists/_category_set.html.erb
205
+ - app/views/xforum/admin_lists/_language_set.html.erb
206
+ - app/views/xforum/admin_lists/_topic_set.html.erb
207
+ - app/views/xforum/admin_users/_admin_users.html.erb
208
+ - app/views/xforum/comments/_forum_comments.html.erb
209
+ - app/views/xforum/comments/_forum_entry.html.erb
210
+ - app/views/xforum/comments/_forum_video.html.erb
205
211
  - app/views/xforum/forums/_dummy.html.erb
206
212
  - app/views/xforum/forums/_forum.html.erb
207
213
  - app/views/xforum/forums/_forum_admin.html.erb
208
- - app/views/xforum/forums/_forum_comments.html.erb
209
- - app/views/xforum/forums/_forum_entry.html.erb
210
- - app/views/xforum/forums/_forum_video.html.erb
211
214
  - app/views/xforum/forums/newphoto.js.erb
212
215
  - app/views/xforum/forums/the_page.html.erb
213
216
  - config/intiializers/xforum.rb
@@ -274,12 +277,12 @@ require_paths:
274
277
  - lib
275
278
  required_ruby_version: !ruby/object:Gem::Requirement
276
279
  requirements:
277
- - - "~>"
280
+ - - ">="
278
281
  - !ruby/object:Gem::Version
279
282
  version: '2.0'
280
283
  required_rubygems_version: !ruby/object:Gem::Requirement
281
284
  requirements:
282
- - - "~>"
285
+ - - ">="
283
286
  - !ruby/object:Gem::Version
284
287
  version: '2.0'
285
288
  requirements: []
@@ -1,15 +0,0 @@
1
- module Xforum
2
- class UserMailer < ActionMailer::Base
3
- default from: 'bnacreationss@gmail.com'
4
-
5
- def note_to_forum_users(params,user_ids)
6
- emails=[]
7
- users_ids.each{
8
- emails.push(Xforum.user_class.where(id:id).pluck(:email)[0])
9
- }
10
- #attachments["notes"] =file.read("notes")
11
- @content=params[:body].split("\n")
12
- mail(to: emails, subject: params[:subject])
13
- end
14
- end
15
- end