Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More styling work on project edit/new, steps and shared variables.

  • Loading branch information...
commit 532361dd20263074b187a70174477ea6d6714017 1 parent a0ea083
authored January 16, 2012
8  app/views/layouts/application.html.haml
@@ -26,8 +26,12 @@
26 26
             checked with
27 27
             = link_to("BigTuna", "http://bigtuna.appelier.com", :target => "_blank", :title => "BigTuna v#{BigTuna::VERSION}")
28 28
     .container
29  
-      = flash[:error]
30  
-      = flash[:notice]
  29
+      - if flash[:error]
  30
+        .alert-message.error
  31
+          = flash[:error]
  32
+      - if flash[:notice]
  33
+        .alert-message.info
  34
+          = flash[:notice]
31 35
       = yield
32 36
 
33 37
     = yield :sidebar
1  app/views/projects/_form.html.haml
@@ -60,4 +60,3 @@
60 60
   %button.btn.large.primary{:type => "submit"}
61 61
     = f.object.new_record? ? "Create project" : "Update"
62 62
   = link_to("Back to project", project_path(f.object), :class => "btn large") unless f.object.new_record?
63  
-
64  app/views/projects/edit.html.haml
... ...
@@ -1,32 +1,44 @@
1  
-= form_for(@project, :url => project_path(@project)) do |f|
2  
-  = render :partial => "form", :locals => {:f => f}
  1
+.page-header
  2
+  %h1
  3
+    Editing
  4
+    = @project.name
  5
+.row
  6
+  = form_for(@project, :url => project_path(@project)) do |f|
  7
+    = render :partial => "form", :locals => {:f => f}
  8
+
  9
+  %h2 New configuration
  10
+  = form_for(StepList.new, :url => step_lists_path(:project_id => @project)) do |f|
  11
+    = render :partial => "step_lists/form", :locals => {:f => f}
  12
+
  13
+  %h2 Available configurations
  14
+  - @project.step_lists.each do |step_list|
3 15
 
4  
-%h2 New configuration
5  
-= form_for(StepList.new, :url => step_lists_path(:project_id => @project)) do |f|
6  
-  = render :partial => "step_lists/form", :locals => {:f => f}
7  
-  %div.hint
8 16
     Special variables are available.
9 17
     %ul
10  
-      %li= "<tt><b>%build_dir%</b> directory where build is checked out</tt>".html_safe
11  
-      %li= "<tt><b>%project_dir%</b> directory shared by all builds in project</tt>".html_safe
12  
-    = "You can comment a step with <tt>#</tt>".html_safe
  18
+      %li 
  19
+        %code %build_dir%
  20
+        directory where build is checked out
  21
+      %li
  22
+        %code %project_dir%
  23
+        directory shared by all builds in project
  24
+        
  25
+    - if step_list.shared_variables.any?
  26
+      %ul
  27
+        - step_list.shared_variables.each do |variable|
  28
+          %li
  29
+            %tt
  30
+              %code= "%#{variable.name}%"
  31
+              = variable.value
13 32
 
14  
-%h2 Available configurations
15  
-- @project.step_lists.each do |step_list|
16  
-  %div.hint
17  
-    %ul
18  
-      - step_list.shared_variables.each do |variable|
19  
-        %li= "<tt><b>%#{variable.name}%</b> #{variable.value}</tt>".html_safe
20  
-    = link_to("Edit config-specific vars", shared_variables_path(:step_list_id => step_list))
21  
-  = form_for(step_list, :url => step_list_path(step_list, :project_id => @project), :html => {:method => "PUT"}) do |f|
22  
-    = render :partial => "step_lists/form", :locals => {:f => f}
23  
-  - unless step_list.new_record?
24  
-    = form_for(step_list, :url => step_list_path(step_list, :project_id => @project), :html => {:method => "DELETE", :id => "remove_step_list_#{step_list.id}"}) do |f|
25  
-      %button.crit_button{:type => "submit"} Remove
  33
+    %p
  34
+      You may comment a step out with
  35
+      %code #
26 36
 
27  
-- content_for :sidebar do
28  
-  - unless BigTuna.read_only?
29  
-    %li= link_to("Project", project_path(@project), :class => "black_button")
30  
-    %li= link_to("Build now", build_project_path(@project), :class => "black_button")
31  
-    %Li= link_to("Duplicate", duplicate_project_path(@project), :class => "black_button")
  37
+    %p
  38
+      = link_to("Edit config-specific vars", shared_variables_path(:step_list_id => step_list))
32 39
 
  40
+    = form_for(step_list, :url => step_list_path(step_list, :project_id => @project), :html => {:method => "PUT"}) do |f|
  41
+      = render :partial => "step_lists/form", :locals => {:f => f}
  42
+    - unless step_list.new_record?
  43
+      = form_for(step_list, :url => step_list_path(step_list, :project_id => @project), :html => {:method => "DELETE", :id => "remove_step_list_#{step_list.id}"}) do |f|
  44
+        %button.btn.danger{:type => "submit"} Remove
5  app/views/projects/show.html.haml
@@ -29,8 +29,3 @@
29 29
     - if @project.builds.any?
30 30
       = render :partial => 'builds'
31 31
     = ajaxReload(project_path(@project, :format => :js))
32  
-
33  
-- content_for :topbar do
34  
-  - unless BigTuna.read_only?
35  
-    %li= link_to("Edit", edit_project_path(@project), :class => "black_button")
36  
-  %li= link_to("Feed", feed_project_path(@project, :format => "atom"), :class => "rss")
63  app/views/shared_variables/index.html.haml
... ...
@@ -1,8 +1,18 @@
1  
-%h2= "Shared variables for &quot;#{@step_list.project.name}&quot;".html_safe
2  
-%p You can set up configuration&ndash;specific <tt>%variables%</tt> here. Real&ndash;life examples would be
  1
+%h2= "Shared variables for &ldquo;#{@step_list.project.name}&rdquo;".html_safe
  2
+
  3
+%p
  4
+  You can set up configuration&ndash;specific 
  5
+  <code>%variables%</code> here. Real&ndash;life examples would be:
  6
+
3 7
 %ul
4  
-  %li= "<tt><b>%runner%</b> rvm 1.8.7 exec</tt>".html_safe
5  
-  %li= "<tt><b>%envs%</b> env RAILS_ENV=test BUNDLE_GEMFILE=%build_dir%/Gemfile</tt>".html_safe
  8
+  %li
  9
+    %tt
  10
+      %code %runner%
  11
+      rvm 1.8.7 exec
  12
+  %li
  13
+    %tt  
  14
+      %code %envs%
  15
+      env RAILS_ENV=test BUNDLE_GEMFILE=%build_dir%/Gemfile
6 16
 
7 17
 %p And then use them in steps like:
8 18
 
@@ -11,30 +21,35 @@
11 21
 \%runner% %envs% bundle exec rake db:migrate
12 22
 \%runner% %envs% bundle exec rake</pre>
13 23
 
14  
-%p Shared variables cannot contain other shared variables except <tt>%build_dir%</tt> and <tt>%project_dir%</tt>.
  24
+%p Shared variables cannot contain other shared variables except <code>%build_dir%</code> and <code>%project_dir%</code>.
15 25
 
16 26
 %h3 Create new variable
17 27
 = form_for(@shared_variable, :url => shared_variables_path(:step_list_id => @step_list)) do |f|
18  
-  %div
  28
+  .clearfix 
19 29
     = f.label(:name)
20  
-    = f.text_field(:name)
21  
-  %div
  30
+    .input
  31
+      = f.text_field(:name, :class => 'pre')
  32
+  .clearfix 
22 33
     = f.label(:value)
23  
-    = f.text_field(:value)
24  
-  %div
25  
-    %button.black_button{:type => "submit"}
  34
+    .input
  35
+      = f.text_field(:value, :class => 'span8 pre')
  36
+  .actions 
  37
+    %button.btn.primary{:type => "submit"}
26 38
       = f.object.new_record? ? "Create" : "Update"
27 39
 
28  
-%h3 Already existing variables
29  
-- @shared_variables.each do |variable|
30  
-  = form_for(variable, :url => shared_variable_path(variable, :step_list_id => @step_list)) do |f|
31  
-    %div
32  
-      = f.label(:name)
33  
-      = f.text_field(:name)
34  
-    %div
35  
-      = f.label(:value)
36  
-      = f.text_field(:value)
37  
-    %div
38  
-      %button.black_button{:type => "submit"} Update
39  
-  = form_for(variable, :url => shared_variable_path(variable, :step_list_id => @step_list), :html => {:method => :delete}) do |f|
40  
-    %button.crit_button{:type => "submit"} Remove
  40
+- if @shared_variables.any?
  41
+  %h3 Already existing variables
  42
+  - @shared_variables.each do |variable|
  43
+    = form_for(variable, :url => shared_variable_path(variable, :step_list_id => @step_list)) do |f|
  44
+      .clearfix
  45
+        = f.label(:name)
  46
+        .input
  47
+          = f.text_field(:name, :class => 'pre')
  48
+      .clearfix 
  49
+        = f.label(:value)
  50
+        .input
  51
+          = f.text_field(:value, :class => 'span8 pre')
  52
+      .actions 
  53
+        %button.btn.primary{:type => "submit"} Update
  54
+    = form_for(variable, :url => shared_variable_path(variable, :step_list_id => @step_list), :html => {:method => :delete}) do |f|
  55
+      %button.btn.danger{:type => "submit"} Remove
18  app/views/step_lists/_form.html.haml
... ...
@@ -1,11 +1,13 @@
1  
-%div
  1
+.clearfix
2 2
   = f.label(:name)
3  
-  %br
4  
-  = f.text_field(:name, :class => 'textfield')
5  
-%div
  3
+  .input
  4
+    = f.text_field(:name, :class => 'textfield')
  5
+.clearfix
6 6
   = f.label(:steps)
7  
-  %br
8  
-  = f.text_area(:steps, :class => 'textarea')
9  
-%div
10  
-  %button.black_button{:type => "submit"}
  7
+  .input
  8
+    = f.text_area(:steps, :class => 'textarea span12 pre')
  9
+.clearfix
  10
+.actions
  11
+  %button.btn.primary{:type => "submit"}
11 12
     = f.object.new_record? ? "Create" : "Update"
  13
+    Config
0  public/images/Offline.png → public/images/bullet.png
File renamed without changes
2  public/stylesheets/master.css
@@ -6,7 +6,7 @@ h1 code {
6 6
   background: none;
7 7
 }
8 8
 
9  
-body samp, body code, body pre {
  9
+input.pre, textarea.pre, body samp, body code, body pre {
10 10
   font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
11 11
 }
12 12
 

0 notes on commit 532361d

Please sign in to comment.
Something went wrong with that request. Please try again.