<div id="repository">
  <%= render "infos", :repository => @repository %>

<div class="repository">

  <%= render "people", :repository => @repository %>

  <%= render "desc", :repository => @repository %>

	<div id="files">
		<% if @repository.branches.size != 0 %>
			<%= render "files", :repository => @repository %>
		<% end %>
	</div>

	<div id="view_readme_file">
		<% if @repository.branches.size != 0 and params[:dir].nil? %>
		<% branch = "master" %>
	  <% branch = params[:branch] if params[:branch] %>
    <% tree = @grit_repo.tree(branch, "") %>
    <% if !params[:dir] %>
      <% blobs = tree.blobs %>
      <% if blobs %>
        <% blobs.each do |a_blob| %>
          <% if a_blob.name =~ /^(README|README.(.*))$/ and a_blob.mime_type =~ /^text\/(.*)$/ %>
 <pre><%= a_blob.data %></pre>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>

	</div>

	<div class="clear"></div>
</div>
</div>

<div id="repository">
  <%= render "infos", :repository => @repository %>

<div class="repository">

  <%= render "people", :repository => @repository %>

  <%= render "desc", :repository => @repository %>

	<div id="files">
		<% if @repository.branches.size != 0 %>
			<%= render "files", :repository => @repository %>
		<% end %>
	</div>

		<% if @repository.branches.size != 0 and params[:dir].nil? %>
		<% branch = "master" %>
	  <% branch = params[:branch] if params[:branch] %>
    <% tree = @grit_repo.tree(branch, "") %>
    <% if !params[:dir] %>
      <% blobs = tree.blobs %>
      <% if blobs %>
        <% blobs.each do |a_blob| %>
            <% if a_blob.name =~ /^(README|README.(.*))$/ and a_blob.mime_type =~ /^text\/(.*)$/ %>
              <div id="view_readme_file">
 <pre><%= a_blob.data %></pre>
              </div>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>

	<div class="clear"></div>
</div>
</div>

Move the div into the if condition, avoid always displaying of the div
Move the div into the if condition, avoid always displaying of the div
