[Logilogi-svn] SF.net SVN: logilogi:[1759] trunk
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2010-07-30 18:00:58
|
Revision: 1759
http://logilogi.svn.sourceforge.net/logilogi/?rev=1759&view=rev
Author: wybow
Date: 2010-07-30 18:00:51 +0000 (Fri, 30 Jul 2010)
Log Message:
-----------
Messages remarks again, small fixes
Modified Paths:
--------------
trunk/app/controllers/remarks_controller.rb
trunk/app/models/annotation.rb
trunk/app/models/log_log_subscription.rb
trunk/app/models/remark.rb
trunk/config/locales/en.yml
Removed Paths:
-------------
trunk/app/views/remarks/edit.html.erb
Modified: trunk/app/controllers/remarks_controller.rb
===================================================================
--- trunk/app/controllers/remarks_controller.rb 2010-07-12 16:54:49 UTC (rev 1758)
+++ trunk/app/controllers/remarks_controller.rb 2010-07-30 18:00:51 UTC (rev 1759)
@@ -42,25 +42,6 @@
end
end
- def edit
- @remarks = @logi.remarks
- end
-
- def destroy
- # TODO fix/add removal of remarks
- if params[:deleted_inserts] and !params[:deleted_inserts].empty?
- params[:deleted_inserts].each do |remark_id|
- @logi.remarks.find(remark_id).destroy
- end
- flash[:notice] = "Successfully removed remarks"
- redirect_to logi_url(@logi.link)
- else
- flash[:warning] = "No remark selected"
- self.edit
- render :template => 'remarks/edit'
- end
- end
-
### Private methods
protected
Modified: trunk/app/models/annotation.rb
===================================================================
--- trunk/app/models/annotation.rb 2010-07-12 16:54:49 UTC (rev 1758)
+++ trunk/app/models/annotation.rb 2010-07-30 18:00:51 UTC (rev 1759)
@@ -86,7 +86,7 @@
# length
if GlobalConfig.done_with_basics?
if self.message.size > GlobalConfig.maximum_message_size
- self.errors.add(:message, t('defaults.error_message_too_long',
+ self.errors.add(:message, t('m.annotation.error_too_long',
:max => GlobalConfig.maximum_message_size))
end
end
Modified: trunk/app/models/log_log_subscription.rb
===================================================================
--- trunk/app/models/log_log_subscription.rb 2010-07-12 16:54:49 UTC (rev 1758)
+++ trunk/app/models/log_log_subscription.rb 2010-07-30 18:00:51 UTC (rev 1759)
@@ -11,13 +11,13 @@
# (doc/LICENSE contains the full text of the legally binding license).
#++#
-class LogLogSubscription # < ActiveResource::Base
-# if GlobalConfig.done_with_basics? and GlobalConfig.use_log_log
-# self.site = GlobalConfig.log_log_site
-# self.user = GlobalConfig.log_log_api_key
-# self.element_name = "message"
-# end
-
+class LogLogSubscription < ActiveRecord::Base
+ ### Relationships
+
+ belongs_to :user
+
+ ### Class-methods
+
def self.send_out_alerts(period)
sent_to = []
User.find_each do |user|
Modified: trunk/app/models/remark.rb
===================================================================
--- trunk/app/models/remark.rb 2010-07-12 16:54:49 UTC (rev 1758)
+++ trunk/app/models/remark.rb 2010-07-30 18:00:51 UTC (rev 1759)
@@ -62,7 +62,7 @@
# length
if GlobalConfig.done_with_basics?
if self.message.size > GlobalConfig.maximum_message_size
- self.errors.add(:message, t('defaults.error_message_too_long',
+ self.errors.add(:message, t('m.remark.error_too_long',
:max => GlobalConfig.maximum_message_size))
end
end
Deleted: trunk/app/views/remarks/edit.html.erb
===================================================================
--- trunk/app/views/remarks/edit.html.erb 2010-07-12 16:54:49 UTC (rev 1758)
+++ trunk/app/views/remarks/edit.html.erb 2010-07-30 18:00:51 UTC (rev 1759)
@@ -1,65 +0,0 @@
-<% form_for(:logi, @logi, :url => logi_remarks_url(@logi),
- :html => {:method => :delete, :id => "remove_form"}) do |form| %>
-
- <%= render :partial => 'logi_inserts/edit_bar_remove' %>
-
- <% render :layout => 'logi_inserts/remove_bar', :locals => {
- :selected => "remove_remarks", :logi => @logi} do %>
- <p> t 'v.remarks.count_remarks',
- :count => @remarks.size %></p>
- <% end %>
-
- <div class="main_column">
- <%= show_flash %>
- </div>
- <div class="spacer"></div>
-
- <div class="main_column">
- <% render :layout => 'application/panel' do %>
- <div class="min_height"></div>
- <label><%= _('defaults.list') %></label><br /><br />
- <% if @remarks.empty? %>
- <p class="one_line">
- <i><%= _('defaults.none') %></i>
- </p>
- <% else %>
- <ul id="available_list" class="remove_list">
- <% @remarks.order_by_created_at.each do |remark| %>
- <li id="r_<%= remark.id.to_s %>">
- <a href="javascript:logiInsertsRemove('<%= remark.id.to_s %>', 'delete', 'undo');">
- [ <span class="action">delete</span> <%= image_tag 'remove_cross.png' %> ]
- </a>
- <%= popover_listing(truncate(remark.message, :length => 35), :remark => remark) %> -
- <%= user_link(remark.user) %>
- </li>
- <% end %>
- </ul>
- <% end %>
- <% end %>
- </div>
-
- <div class="side_column">
- <% render :layout => 'application/wizzard_cloud_panel' do %>
- <h3><%= t 'v.remarks.which' %></h3>
- <p><%= t 'v.remarks.click_want_delete' %></p>
- <% end %>
- </div>
- <div class="spacer"></div>
-
- <div class="main_column">
- <%= render :partial => 'logi_inserts/deletion_list' %>
- </div>
-
- <div class="side_column">
- <% render :layout => 'application/wizzard_cloud_panel' do %>
- <h3><%= t 'v.remarks.are_sure' %></h3>
- <p><%= t 'v.remarks.indeed_remove' %></p>
- <% end %>
- </div>
- <div class="spacer"></div>
-
- <div class="main_column">
- <%= render :partial => 'application/submit', :locals => {
- :form => form, :cancel_url => logi_url(@logi)} %>
- </div>
-<% end %>
Modified: trunk/config/locales/en.yml
===================================================================
--- trunk/config/locales/en.yml 2010-07-12 16:54:49 UTC (rev 1758)
+++ trunk/config/locales/en.yml 2010-07-30 18:00:51 UTC (rev 1759)
@@ -3,7 +3,7 @@
activerecord:
attributes:
annotation:
- message: Message
+ message: Annotation
logi:
body: Body
selection: Selection
@@ -11,7 +11,7 @@
peer_group:
name: Name
remark:
- message: Message
+ message: Remark
user:
email: Email
name: Name
@@ -52,10 +52,10 @@
one: "1 error prohibited this {{model}} from being saved."
other: "{{count}} errors prohibited this {{model}} from being saved."
models:
- annotation: message
+ annotation: annotation
logi: logi
logi_version: "logi version"
- remark: message
+ remark: remark
user: user
user_session: "user session"
authlogic:
@@ -73,13 +73,13 @@
password_invalid: "is not valid."
c:
annotations:
- added: "Successfully added message."
- error_adding: "Problem adding message."
- error_select_text: "needs to be made in the logi at the location where the message should be attached and the message should not be empty."
- no_selected: "No message selected."
+ added: "Successfully added annotation."
+ error_adding: "Problem adding annotation."
+ error_select_text: "needs to be made in the logi at the location where the annotation should be attached and the annotation should not be empty."
+ no_selected: "No annotation selected."
page_name:
edit: Remove
- removed: "Successfully removed messages."
+ removed: "Successfully removed annotations."
application:
error_empty: "should not be empty if it is not a replying logi."
error_overlap_html: "should not overlap with html tags, like different styles or multiple lists."
@@ -308,7 +308,6 @@
error_bounds: "Score out of bounds -2, 5."
error_cannot_point: "cannot point to itself."
error_end_position_range_bigger: "End of PositionRange bigger than the logi:"
- error_message_too_long: "Message is too long (maximum is {{max}} characters)"
error_must_start: "must start with a capital letter."
error_should_contain: "should only contain alphanumerical symbols, spaces, underscores, dots and hyphens."
error_tag_invalid_string: "Invalid tag string."
@@ -375,11 +374,11 @@
path: Path
perma_link_label: "The following is the permalink of this logi. Hit Ctrl A followed by Ctrl C on your keyboard to copy to your clipboard:"
remove: "Detach from text"
- remove_annotations: Messages
+ remove_annotations: Annotations
remove_external_links: "External resources"
remove_links: Links
removing: "Currently detaching things from the text of a logi."
- removing_annotations: "Currently detaching and deleting messages."
+ removing_annotations: "Currently detaching and deleting annotations."
removing_external_links: "Currently detaching and deleting links to other sites."
removing_links: "Currently detaching and deleting links to tags or to logis."
search: Search
@@ -394,7 +393,8 @@
you: You
m:
annotation:
- html_tags_not_allowed: "html tags are not allowed inside messages."
+ html_tags_not_allowed: "html tags are not allowed inside annotations."
+ error_too_long: "Annotation is too long (maximum is {{max}} characters)"
const:
bad: bad
everyone_edit: "Everyone can edit"
@@ -458,8 +458,9 @@
error_no_power: "You have no voting-power in this peergroup."
error_vote_for_own: "You can't vote for own logis."
remark:
- html_tags_not_allowed: "html tags are not allowed inside messages."
- links_not_allowed: "links are not allowed inside messages."
+ html_tags_not_allowed: "html tags are not allowed inside remarks."
+ links_not_allowed: "links are not allowed inside remarks."
+ error_too_long: "Remark is too long (maximum is {{max}} characters)"
tag:
error_invalid_tags: "Invalid tags."
error_too_long: "The tag-string is too long."
@@ -523,15 +524,15 @@
pm: pm
v:
annotations:
- adding: "Adding message"
- annotation_label: "Message:"
- annotations: Messages
- click_crosses: "Click on the crosses of the messages you want to delete. This will move them to the deletion list."
+ adding: "Adding annotation"
+ annotation_label: "Annotation:"
+ annotations: Annotations
+ click_crosses: "Click on the crosses of the annotations you want to delete. This will move them to the deletion list."
count_annotations:
- one: "There is {{count}} message attached to the text of this logi."
- other: "There are {{count}} messages attached to the text of this logi."
- indeed_remove: "Check if these are indeed the messages you want to detach and delete. Then submit."
- which_annotations: "Which messages?"
+ one: "There is {{count}} annotation attached to the text of this logi."
+ other: "There are {{count}} annotations attached to the text of this logi."
+ indeed_remove: "Check if these are indeed the annotations you want to detach and delete. Then submit."
+ which_annotations: "Which annotations?"
application:
are_you_sure: "Are you sure?"
error: Error
@@ -640,13 +641,13 @@
no_matches: "No matches found..."
which_links: "Which links?"
logi_inserts:
- annotation: Message
- are_removing: "Links and messages you detach will also be deleted."
+ annotation: Annotation
+ are_removing: "Links and annotations you detach will also be deleted."
check_indeed: "Check if this is indeed the phrase or word to which you want to attach something."
deletion_list_label: "Deletion list:"
- everyone_can_insert: "You can attach messages and various types of links to a word or phrase in the text. Everyone can do this for all logis (not just authors)."
+ everyone_can_insert: "You can attach annotations and various types of links to a word or phrase in the text. Everyone can do this for all logis (not just authors)."
external_link: "External resource"
- insert_annotation: "Attach a message."
+ insert_annotation: "Attach an annotation."
insert_external_link: "Attach a link that points to a different site (outside of LogiLogi)."
insert_logi_link: "Attach a link that points to another logi."
insert_new_logi: "Attach a link that points to a newly created logi."
@@ -658,9 +659,9 @@
paste_perma_link: "Paste (Ctrl V) the perma-link of the logi that the link should point to."
perma_link_tab: "Specific logi"
right_text: "Is it the right phrase?"
- select_insert: "Select what you want to attach; a new logi, various types of links, or a message."
+ select_insert: "Select what you want to attach; a new logi, various types of links, or an annotation."
select_range: "Select the range of text to which you want it to be attached."
- select_remove: "Select what you want to detach; links to logis, external links, or messages."
+ select_remove: "Select what you want to detach; links to logis, external links, or annotations."
selected_label: "Selected phrase:"
submit_and_attach: "Submit & attach more"
tag_link_tab: Tags
@@ -684,7 +685,7 @@
tags: Tags
want_browsed: "Want your logi to be browsed to?"
logis:
- add_remark: "add message"
+ add_remark: "add remark"
add_tag: "Add tag"
add_word_or_tag: "Add word or tag"
are_positive:
@@ -708,11 +709,11 @@
one: "Has {{count}} reply."
other: "Has {{count}} replies."
comments_on:
- one: "Messages on {{count}} logi."
- other: "Messages on {{count}} logis."
+ one: "Replies to {{count}} logi."
+ other: "Replies to {{count}} logis."
comments_on_has:
- one: "Messages on {{on_count}}, has {{count}} reply."
- other: "Messages on {{on_count}}, has {{count}} replies."
+ one: "Replies to {{on_count}}, has {{count}} reply."
+ other: "Replies to {{on_count}}, has {{count}} replies."
count_comments:
one: "Logi has {{count}} reply."
other: "Logi has {{count}} replies."
@@ -770,8 +771,8 @@
recent_writings: "Recent writings"
recently_rated: "Recently positively rated"
related_tags_suggested: "Related tags suggested for browsing."
- remark_to_author: "Short message to author?"
- remarks: Messages
+ remark_to_author: "Short remark to author?"
+ remarks: Remarks
search_word_or_tag: "Search word or tag"
select_edit: "Select whether you want to edit the text, or the settings."
select_insert_remove: "Select whether you want to attach things to phrases in the text, or detach them from the text."
@@ -887,15 +888,9 @@
average_label: "Average rating:"
weight_label: "Rating weight:"
remarks:
- adding: "Adding message"
+ adding: "Adding remark"
are_sure: "Are you sure?"
- click_want_delete: "Click on the crosses of the messages you want to delete. This will move them to the deletion list."
- count_remarks:
- one: "There is {{count}} message attached to the text of this logi."
- other: "There are {{count}} messages attached to the text of this logi."
- indeed_remove: "Check if these are indeed the messages you want to detach and delete. Then submit."
- remark: Message
- which: "Which messages?"
+ remark: Remark
searches:
back_browse: "Back to search"
count_same_tags:
@@ -954,7 +949,7 @@
signup_openid: "Signup with an OpenID."
use_api: "You can use our API to remotely post and update logis."
with_openid: "With OpenID"
- your_rss_updated: "Your RSS-feed is updated whenever something happens related to your logis (messages, votes, updates, ...)."
+ your_rss_updated: "Your RSS-feed is updated whenever something happens related to your logis (annotations, votes, updates, ...)."
votes:
cant_vote_own: "You can't vote on your own logi."
no_voting_power: "You don't have any voting power in this peergroup."
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|