Commit 49b2fb24bc0a06b41c6ff328f8a8c63b26921c31
1 parent
c092f397
Exists in
master
and in
4 other branches
remove fluiod layout
Showing
6 changed files
with
7 additions
and
26 deletions
Show diff stats
app/controllers/application_controller.rb
| 1 | class ApplicationController < ActionController::Base | 1 | class ApplicationController < ActionController::Base |
| 2 | before_filter :authenticate_user! | 2 | before_filter :authenticate_user! |
| 3 | - before_filter :view_style | ||
| 4 | - | ||
| 5 | protect_from_forgery | 3 | protect_from_forgery |
| 6 | - | ||
| 7 | helper_method :abilities, :can? | 4 | helper_method :abilities, :can? |
| 8 | 5 | ||
| 9 | rescue_from Gitosis::AccessDenied do |exception| | 6 | rescue_from Gitosis::AccessDenied do |exception| |
| @@ -76,20 +73,6 @@ class ApplicationController < ActionController::Base | @@ -76,20 +73,6 @@ class ApplicationController < ActionController::Base | ||
| 76 | redirect_to @project unless @project.repo_exists? | 73 | redirect_to @project unless @project.repo_exists? |
| 77 | end | 74 | end |
| 78 | 75 | ||
| 79 | - def view_style | ||
| 80 | - if params[:view_style] == "collapsed" | ||
| 81 | - cookies[:view_style] = "collapsed" | ||
| 82 | - elsif params[:view_style] == "fluid" | ||
| 83 | - cookies[:view_style] = "fluid" | ||
| 84 | - end | ||
| 85 | - | ||
| 86 | - @view_mode = if cookies[:view_style] == "fluid" | ||
| 87 | - :fluid | ||
| 88 | - else | ||
| 89 | - :collapsed | ||
| 90 | - end | ||
| 91 | - end | ||
| 92 | - | ||
| 93 | def respond_with_notes | 76 | def respond_with_notes |
| 94 | if params[:last_id] && params[:first_id] | 77 | if params[:last_id] && params[:first_id] |
| 95 | @notes = @notes.where("id >= ?", params[:first_id]) | 78 | @notes = @notes.where("id >= ?", params[:first_id]) |
app/helpers/application_helper.rb
| @@ -7,7 +7,7 @@ module ApplicationHelper | @@ -7,7 +7,7 @@ module ApplicationHelper | ||
| 7 | end | 7 | end |
| 8 | 8 | ||
| 9 | def fixed_mode? | 9 | def fixed_mode? |
| 10 | - @view_mode == :fluid | 10 | + true |
| 11 | end | 11 | end |
| 12 | 12 | ||
| 13 | def body_class(default_class = nil) | 13 | def body_class(default_class = nil) |
| @@ -15,7 +15,7 @@ module ApplicationHelper | @@ -15,7 +15,7 @@ module ApplicationHelper | ||
| 15 | default_class : | 15 | default_class : |
| 16 | content_for(:body_class) | 16 | content_for(:body_class) |
| 17 | 17 | ||
| 18 | - [main, @view_mode].join(" ") | 18 | + [main, "collapsed"].join(" ") |
| 19 | end | 19 | end |
| 20 | 20 | ||
| 21 | def commit_name(project, commit) | 21 | def commit_name(project, commit) |
app/views/layouts/_head_panel.html.erb
| @@ -11,10 +11,8 @@ | @@ -11,10 +11,8 @@ | ||
| 11 | <div class="account-links"> | 11 | <div class="account-links"> |
| 12 | <%= link_to profile_path, :class => "username" do %> | 12 | <%= link_to profile_path, :class => "username" do %> |
| 13 | <%#= current_user.name %> | 13 | <%#= current_user.name %> |
| 14 | - Your profile | 14 | + My profile |
| 15 | <% end %> | 15 | <% end %> |
| 16 | - <%= link_to "Fluid layout", url_for( :view_style => 'fluid' ) unless cookies[:view_style] == "fluid"%> | ||
| 17 | - <%= link_to "Fixed layout", url_for( :view_style => 'collapsed' ) if cookies[:view_style] == "fluid"%> | ||
| 18 | <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %> | 16 | <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %> |
| 19 | </div> | 17 | </div> |
| 20 | </div><!-- .account-box --> | 18 | </div><!-- .account-box --> |
app/views/projects/_recent_commits.html.haml
| @@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
| 22 | - else | 22 | - else |
| 23 | = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" | 23 | = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" |
| 24 | .title | 24 | .title |
| 25 | - %p= link_to truncate(commit.safe_message, :length => fixed_mode? ? 40 : 100), project_commit_path(@project, :id => commit.id) | 25 | + %p= link_to truncate(commit.safe_message, :length => 40), project_commit_path(@project, :id => commit.id) |
| 26 | 26 | ||
| 27 | %span | 27 | %span |
| 28 | %span.author | 28 | %span.author |
app/views/projects/_recent_messages.html.haml
| @@ -7,14 +7,14 @@ | @@ -7,14 +7,14 @@ | ||
| 7 | %thead | 7 | %thead |
| 8 | %th | 8 | %th |
| 9 | %div{ :class => "recent_message_parent"} | 9 | %div{ :class => "recent_message_parent"} |
| 10 | - = link_to(truncate(dashboard_feed_title(parent), :length => fixed_mode? ? 40 : 100 ), dashboard_feed_path(@project, parent)) | 10 | + = link_to(truncate(dashboard_feed_title(parent), :length => 40 ), dashboard_feed_path(@project, parent)) |
| 11 | - notes.sort {|x,y| y.updated_at <=> x.updated_at }.each do |note| | 11 | - notes.sort {|x,y| y.updated_at <=> x.updated_at }.each do |note| |
| 12 | %tr | 12 | %tr |
| 13 | %td | 13 | %td |
| 14 | %div.message | 14 | %div.message |
| 15 | = image_tag gravatar_icon(note.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" | 15 | = image_tag gravatar_icon(note.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" |
| 16 | %div.title | 16 | %div.title |
| 17 | - = link_to markdown(truncate(note.note, :length => fixed_mode? ? 40 : 100)), dashboard_feed_path(@project, parent) + "#note_#{note.id}" | 17 | + = link_to markdown(truncate(note.note, :length => 40)), dashboard_feed_path(@project, parent) + "#note_#{note.id}" |
| 18 | - if note.attachment.url | 18 | - if note.attachment.url |
| 19 | %br | 19 | %br |
| 20 | Attachment: | 20 | Attachment: |
app/views/projects/_tree_item.html.haml
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | = time_ago_in_words(content_commit.committed_date) | 12 | = time_ago_in_words(content_commit.committed_date) |
| 13 | ago | 13 | ago |
| 14 | %td.commit | 14 | %td.commit |
| 15 | - = link_to truncate(content_commit.safe_message, :length => fixed_mode? ? 40 : 80), project_commit_path(@project, content_commit), :class => "tree-commit-link" | 15 | + = link_to truncate(content_commit.safe_message, :length => 40), project_commit_path(@project, content_commit), :class => "tree-commit-link" |
| 16 | - tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name) | 16 | - tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name) |
| 17 | - if tm | 17 | - if tm |
| 18 | = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) | 18 | = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) |