Skip to content

Commit

Permalink
Changeset History - improve grid usage on edit view
Browse files Browse the repository at this point in the history
With the recent changes to the left panel sizing for changesets
(i.e. to use 1 column), the format of the right edit pane runs
together a bit.

This commit is to change some of the grid usage to take advantage
of the increased size of the right pane.

In a future commit, we'll address the sizing of the jeditable
text field and area; however, wanted to get this initial change in.
  • Loading branch information
bbuckingham committed Aug 16, 2011
1 parent 55440a6 commit 3e01b6b
Showing 1 changed file with 40 additions and 42 deletions.
82 changes: 40 additions & 42 deletions src/app/views/changesets/_edit.html.haml
Expand Up @@ -6,47 +6,45 @@
= _("Details")

= content_for :content do
#changeset.fieldset{'data-ajax_url'=>changeset_path(@changeset.id)}
.grid_2.ra
%label #{_("Name:")}
.grid_5.la.editable.edit_textfield{:name=>"name", "data-id"=>@changeset.id,"data-url"=>changeset_path(@changeset.id)} #{@changeset.name}

#changeset.fieldset{'data-ajax_url'=>changeset_path(@changeset.id)}
.grid_2.ra
%label #{_("Description:")}
.grid_5.la.editable.edit_description{:name=>"description", "data-id"=>@changeset.id,"data-url"=>changeset_path(@changeset.id)} #{@changeset.description}




.fieldset
.grid_2.ra
%label #{_("Promotion Date:")}
.grid_5.la
= I18n.l(@changeset.promotion_date, :format=>:long)

.grid_8
%h2 #{_("Contents:")}
-if @changeset.involved_products.empty?
.grid_4.prefix_1
#{_("This changeset contains no content.")}
-else
#accordion.grid_7{:style=>"min-height: 200px"}
- if !@changeset.products.empty?
%h2
%a{:href=>'#'} #{_("Full Products")}
#full_products
%ul
-for prod in @changeset.products
%li #{prod.name}
- for prod in @changeset.partial_products
%h2
%a{:href=>'#'} #{_(prod.name)}
= render :partial=>"content_type", :locals=>{:items=>@changeset.packages.where(:product_id=>prod.id).collect{|i| i.display_name},
:type_string=>_("Packages")}
= render :partial=>"content_type", :locals=>{:items=>@changeset.errata.where(:product_id=>prod.id).collect{|i| i.display_name},
:type_string=>_("Errata")}
= render :partial=>"content_type", :locals=>{:items=>@changeset.repos.where(:product_id=>prod.id).collect{|i| i.display_name},
:type_string=>_("Repositories")}
.grid_10
#changeset.fieldset{'data-ajax_url'=>changeset_path(@changeset.id)}
.grid_2.ra
%label #{_("Name:")}
.grid_7.la.editable.edit_textfield{:name=>"name", "data-id"=>@changeset.id,"data-url"=>changeset_path(@changeset.id)} #{@changeset.name}

#changeset.fieldset{'data-ajax_url'=>changeset_path(@changeset.id)}
.grid_2.ra
%label #{_("Description:")}
.grid_7.la.editable.edit_description{:name=>"description", "data-id"=>@changeset.id,"data-url"=>changeset_path(@changeset.id)} #{@changeset.description}

.fieldset
.grid_2.ra
%label #{_("Promotion Date:")}
.grid_7.la
= I18n.l(@changeset.promotion_date, :format=>:long)

.grid_10
%h2 #{_("Contents:")}
-if @changeset.involved_products.empty?
.grid_7.prefix_1
#{_("This changeset contains no content.")}
-else
#accordion.grid_8.prefix_1{:style=>"min-height: 200px"}
- if !@changeset.products.empty?
%h3
%a{:href=>'#'} #{_("Full Products")}
#full_products
%ul
-for prod in @changeset.products
%li #{prod.name}
- for prod in @changeset.partial_products
%h3
%a{:href=>'#'} #{_(prod.name)}
= render :partial=>"content_type", :locals=>{:items=>@changeset.packages.where(:product_id=>prod.id).collect{|i| i.display_name},
:type_string=>_("Packages")}
= render :partial=>"content_type", :locals=>{:items=>@changeset.errata.where(:product_id=>prod.id).collect{|i| i.display_name},
:type_string=>_("Errata")}
= render :partial=>"content_type", :locals=>{:items=>@changeset.repos.where(:product_id=>prod.id).collect{|i| i.display_name},
:type_string=>_("Repositories")}


0 comments on commit 3e01b6b

Please sign in to comment.