This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added users/blog posts association, more
- Loading branch information
Josh Adams
committed
Feb 10, 2009
1 parent
1f66ba6
commit 703fcb2
Showing
11 changed files
with
64 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 20 additions & 20 deletions
40
vendor/plugins/ansuz_savage_beast/app/views/topics/_form.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
<p> | ||
<label for="topic_title"><%= 'Title'[:title_title] %></label><br /> | ||
<%= form.text_field :title, :onchange => "/*TopicForm.editNewTitle(this);*/", :class => "primary", :tabindex => 10 %> | ||
<label for="topic_title"><%= 'Title'[:title_title] %></label><br /> | ||
<%= form.text_field :title, :onchange => "/*TopicForm.editNewTitle(this);*/", :class => "primary" %> | ||
<% if admin? or current_user.moderator_of?(@topic.forum) %> | ||
<label style="margin-left:1em;"> | ||
<%= form.check_box :sticky %> <%= 'Sticky'[:sticky_title] %> | ||
</label> | ||
|
||
<label style="margin-left:1em;"> | ||
<%= form.check_box :locked %> <%= 'Locked'[:locked_title] %> | ||
</label> | ||
|
||
<% end %> | ||
<% if admin? or current_user.moderator_of?(@topic.forum) %> | ||
<label style="margin-left:1em;"> | ||
<%= form.check_box :sticky %> <%= 'Sticky'[:sticky_title] %> | ||
</label> | ||
|
||
<label style="margin-left:1em;"> | ||
<%= form.check_box :locked %> <%= 'Locked'[:locked_title] %> | ||
</label> | ||
<% end %> | ||
</p> | ||
|
||
<% if @topic.new_record? %> | ||
<p> | ||
<label for="topic_body"><%= 'Body'[:body_title] %></label><br /> | ||
<%= form.text_area :body, :rows => 12, :tabindex => 20 %></p> | ||
<p> | ||
<label for="topic_body"><%= 'Body'[:body_title] %></label><br /> | ||
<%= form.text_area :body, :rows => 12 %> | ||
</p> | ||
<% end %> | ||
<% if admin? and not @topic.new_record? %> | ||
<p id="topic_forum_id"> | ||
<label for="topic_forum_id"><%= 'Forum'[:forum_title] %></label><br /> | ||
<%= form.select :forum_id, Forum.find(:all, :order => "position").map {|x| [x.name, x.id] } %></p> | ||
</p> | ||
<% end %> | ||
<p id="topic_forum_id"> | ||
<label for="topic_forum_id"><%= 'Forum'[:forum_title] %></label><br /> | ||
<%= form.select :forum_id, Forum.find(:all, :order => "position").map {|x| [x.name, x.id] } %></p> | ||
</p> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Patching Engines as per http://www.ruby-forum.com/topic/166578 | ||
require 'dispatcher' | ||
|
||
Engines::Plugin.class_eval do | ||
def apply_mixin_to_model(model_class, mixin_module) | ||
Dispatcher.to_prepare { | ||
model_class = Kernel.const_get(model_class.to_s) # \ weird, yet | ||
mixin_module = Kernel.const_get(mixin_module.to_s) # / required. | ||
model_class.send(:extend, mixin_module.const_get("ClassMethods")) | ||
model_class.send(:include, | ||
mixin_module.const_get("InstanceMethods")) | ||
model_class.instance_eval &(mixin_module.class_definition()) | ||
} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters