[Logilogi-svn] SF.net SVN: logilogi:[1680] trunk
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2010-02-01 19:10:19
|
Revision: 1680
http://logilogi.svn.sourceforge.net/logilogi/?rev=1680&view=rev
Author: wybow
Date: 2010-02-01 19:10:13 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Added titles to read-paths
Modified Paths:
--------------
trunk/app/controllers/paths_controller.rb
trunk/app/models/path.rb
trunk/app/views/logis/_paths.html.erb
trunk/app/views/logis/_steps.html.erb
trunk/db/schema.rb
trunk/public/stylesheets/logilogi.css
trunk/test/fixtures/paths.yml
Added Paths:
-----------
trunk/db/migrate/20100201180604_paths_add_title.rb
trunk/public/do/magick_corners/scaled_image.27.height.up_button_disabled.svg.png
Modified: trunk/app/controllers/paths_controller.rb
===================================================================
--- trunk/app/controllers/paths_controller.rb 2010-02-01 19:07:03 UTC (rev 1679)
+++ trunk/app/controllers/paths_controller.rb 2010-02-01 19:10:13 UTC (rev 1680)
@@ -26,7 +26,7 @@
end
def create
- path = Path.new(:user => current_user)
+ path = Path.new(:user => current_user, :title => params[:path][:title])
if !current_user.anonymous? and path.save
render :xml => path, :status => :created,
Modified: trunk/app/models/path.rb
===================================================================
--- trunk/app/models/path.rb 2010-02-01 19:07:03 UTC (rev 1679)
+++ trunk/app/models/path.rb 2010-02-01 19:10:13 UTC (rev 1680)
@@ -19,4 +19,8 @@
belongs_to :user
has_many :steps, :order => :position, :dependent => :destroy
has_many :logis, :through => :steps
+
+ ### Validations
+
+ validates_presence_of :title
end
Modified: trunk/app/views/logis/_paths.html.erb
===================================================================
--- trunk/app/views/logis/_paths.html.erb 2010-02-01 19:07:03 UTC (rev 1679)
+++ trunk/app/views/logis/_paths.html.erb 2010-02-01 19:10:13 UTC (rev 1680)
@@ -1,7 +1,7 @@
<div id="contenders_padding">
<div class="path">
- <%= render :partial => 'steps', :locals => {:steps => @path.steps,
- :current_logi => @logi} %>
+ <%= render :partial => 'steps', :locals => {:path => @path,
+ :steps => @path.steps, :current_logi => @logi} %>
</div>
<div class="spacer"></div>
</div>
Modified: trunk/app/views/logis/_steps.html.erb
===================================================================
--- trunk/app/views/logis/_steps.html.erb 2010-02-01 19:07:03 UTC (rev 1679)
+++ trunk/app/views/logis/_steps.html.erb 2010-02-01 19:10:13 UTC (rev 1680)
@@ -19,6 +19,7 @@
i_end = steps.size
end
%>
+ <h3><%= path.title %></h3>
<%= toggle_button_to t('v.logis.previous'),
(index > 0 ? logi_ll_url(steps[index - 1].logi,
:anchor => 'logi_top') : ''),
Added: trunk/db/migrate/20100201180604_paths_add_title.rb
===================================================================
--- trunk/db/migrate/20100201180604_paths_add_title.rb (rev 0)
+++ trunk/db/migrate/20100201180604_paths_add_title.rb 2010-02-01 19:10:13 UTC (rev 1680)
@@ -0,0 +1,9 @@
+class PathsAddTitle < ActiveRecord::Migration
+ def self.up
+ add_column :paths, :title, :string, :null => false
+ end
+
+ def self.down
+ remove_column :paths, :title
+ end
+end
Modified: trunk/db/schema.rb
===================================================================
--- trunk/db/schema.rb 2010-02-01 19:07:03 UTC (rev 1679)
+++ trunk/db/schema.rb 2010-02-01 19:10:13 UTC (rev 1680)
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20100108214701) do
+ActiveRecord::Schema.define(:version => 20100201180604) do
create_table "acts_as_xapian_jobs", :force => true do |t|
t.string "model", :null => false
@@ -178,6 +178,7 @@
create_table "paths", :force => true do |t|
t.integer "user_id", :null => false
t.datetime "created_at", :null => false
+ t.string "title", :null => false
end
create_table "peer_group_memberships", :force => true do |t|
Added: trunk/public/do/magick_corners/scaled_image.27.height.up_button_disabled.svg.png
===================================================================
(Binary files differ)
Property changes on: trunk/public/do/magick_corners/scaled_image.27.height.up_button_disabled.svg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/public/stylesheets/logilogi.css
===================================================================
--- trunk/public/stylesheets/logilogi.css 2010-02-01 19:07:03 UTC (rev 1679)
+++ trunk/public/stylesheets/logilogi.css 2010-02-01 19:10:13 UTC (rev 1680)
@@ -255,8 +255,8 @@
list-style: none;
}
.panel div.steps {
- padding-top: 1em;
- padding-bottom: 1em;
+ padding-top: 0.7em;
+ padding-bottom: 0.7em;
}
.panel div.step div.level1,
.panel div.step div.level2 {
@@ -275,6 +275,9 @@
padding-top: 0.3em;
padding-bottom: 0.3em;
}
+#contenders_paths h3 {
+ margin-bottom: 0.5em;
+}
#paths .button {
float: left;
}
Modified: trunk/test/fixtures/paths.yml
===================================================================
--- trunk/test/fixtures/paths.yml 2010-02-01 19:07:03 UTC (rev 1679)
+++ trunk/test/fixtures/paths.yml 2010-02-01 19:10:13 UTC (rev 1680)
@@ -1,3 +1,4 @@
history:
user: john_johnson
+ title: "Historic path, across scenery"
created_at: <%= 1.day.ago.to_s(:db) %>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|