Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
6863c003
Commit
6863c003
authored
Sep 15, 2010
by
Tim Felgentreff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forgot a few versioned => journaled conversions
parent
3279b2ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
document.rb
app/models/document.rb
+1
-1
mail_handler.rb
app/models/mail_handler.rb
+2
-2
news.rb
app/models/news.rb
+1
-1
index.rhtml
app/views/search/index.rhtml
+4
-1
No files found.
app/models/document.rb
View file @
6863c003
...
...
@@ -21,7 +21,7 @@ class Document < ActiveRecord::Base
acts_as_attachable
:delete_permission
=>
:manage_documents
acts_as_journalized
:event_title
=>
Proc
.
new
{
|
o
|
"
#{
l
(
:label_document
)
}
:
#{
o
.
title
}
"
},
:event_url
=>
Proc
.
new
{
|
o
|
{
:controller
=>
'documents'
,
:action
=>
'show'
,
:id
=>
o
.
version
ed_id
}},
:event_url
=>
Proc
.
new
{
|
o
|
{
:controller
=>
'documents'
,
:action
=>
'show'
,
:id
=>
o
.
journal
ed_id
}},
:event_author
=>
(
Proc
.
new
do
|
o
|
o
.
attachments
.
find
(
:first
,
:order
=>
"
#{
Attachment
.
table_name
}
.created_on ASC"
).
try
(
:author
)
end
)
...
...
app/models/mail_handler.rb
View file @
6863c003
...
...
@@ -197,8 +197,8 @@ class MailHandler < ActionMailer::Base
# Reply will be added to the issue
def
receive_journal_reply
(
journal_id
)
journal
=
Journal
.
find_by_id
(
journal_id
)
if
journal
and
journal
.
version
ed
.
is_a?
Issue
receive_issue_reply
(
journal
.
version
ed_id
)
if
journal
and
journal
.
journal
ed
.
is_a?
Issue
receive_issue_reply
(
journal
.
journal
ed_id
)
end
end
...
...
app/models/news.rb
View file @
6863c003
...
...
@@ -24,7 +24,7 @@ class News < ActiveRecord::Base
validates_length_of
:title
,
:maximum
=>
60
validates_length_of
:summary
,
:maximum
=>
255
acts_as_journalized
:event_url
=>
Proc
.
new
{
|
o
|
{
:controller
=>
'news'
,
:action
=>
'show'
,
:id
=>
o
.
version
ed_id
}
}
acts_as_journalized
:event_url
=>
Proc
.
new
{
|
o
|
{
:controller
=>
'news'
,
:action
=>
'show'
,
:id
=>
o
.
journal
ed_id
}
}
acts_as_searchable
:columns
=>
[
'title'
,
'summary'
,
"
#{
table_name
}
.description"
],
:include
=>
:project
def
visible?
(
user
=
User
.
current
)
...
...
app/views/search/index.rhtml
View file @
6863c003
...
...
@@ -26,7 +26,10 @@
<h3>
<%=
l
(
:label_result_plural
)
%>
(
<%=
@results_by_type
.
values
.
sum
%>
)
</h3>
<dl
id=
"search-results"
>
<%
@results
.
each
do
|
e
|
%>
<dt
class=
"
<%=
e
.
event_type
%>
"
>
<%=
content_tag
(
'span'
,
h
(
e
.
project
),
:class
=>
'project'
)
unless
@project
==
e
.
project
%>
<%=
link_to
highlight_tokens
(
truncate
(
e
.
event_title
,
:length
=>
255
),
@tokens
),
e
.
event_url
%>
</dt>
<dt
class=
"
<%=
e
.
event_type
%>
"
>
<%=
content_tag
(
'span'
,
h
(
e
.
project
),
:class
=>
'project'
)
unless
@project
==
e
.
project
%>
<%=
link_to
highlight_tokens
(
truncate
(
e
.
event_title
,
:length
=>
255
),
@tokens
),
e
.
event_url
%>
</dt>
<dd><span
class=
"description"
>
<%=
highlight_tokens
(
e
.
event_description
,
@tokens
)
%>
</span>
<span
class=
"author"
>
<%=
format_time
(
e
.
event_datetime
)
%>
</span></dd>
<%
end
%>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment