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 | 1 | class ApplicationController < ActionController::Base |
| 2 | 2 | before_filter :authenticate_user! |
| 3 | - before_filter :view_style | |
| 4 | - | |
| 5 | 3 | protect_from_forgery |
| 6 | - | |
| 7 | 4 | helper_method :abilities, :can? |
| 8 | 5 | |
| 9 | 6 | rescue_from Gitosis::AccessDenied do |exception| |
| ... | ... | @@ -76,20 +73,6 @@ class ApplicationController < ActionController::Base |
| 76 | 73 | redirect_to @project unless @project.repo_exists? |
| 77 | 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 | 76 | def respond_with_notes |
| 94 | 77 | if params[:last_id] && params[:first_id] |
| 95 | 78 | @notes = @notes.where("id >= ?", params[:first_id]) | ... | ... |
app/helpers/application_helper.rb
| ... | ... | @@ -7,7 +7,7 @@ module ApplicationHelper |
| 7 | 7 | end |
| 8 | 8 | |
| 9 | 9 | def fixed_mode? |
| 10 | - @view_mode == :fluid | |
| 10 | + true | |
| 11 | 11 | end |
| 12 | 12 | |
| 13 | 13 | def body_class(default_class = nil) |
| ... | ... | @@ -15,7 +15,7 @@ module ApplicationHelper |
| 15 | 15 | default_class : |
| 16 | 16 | content_for(:body_class) |
| 17 | 17 | |
| 18 | - [main, @view_mode].join(" ") | |
| 18 | + [main, "collapsed"].join(" ") | |
| 19 | 19 | end |
| 20 | 20 | |
| 21 | 21 | def commit_name(project, commit) | ... | ... |
app/views/layouts/_head_panel.html.erb
| ... | ... | @@ -11,10 +11,8 @@ |
| 11 | 11 | <div class="account-links"> |
| 12 | 12 | <%= link_to profile_path, :class => "username" do %> |
| 13 | 13 | <%#= current_user.name %> |
| 14 | - Your profile | |
| 14 | + My profile | |
| 15 | 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 | 16 | <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %> |
| 19 | 17 | </div> |
| 20 | 18 | </div><!-- .account-box --> | ... | ... |
app/views/projects/_recent_commits.html.haml
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | - else |
| 23 | 23 | = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" |
| 24 | 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 | 27 | %span |
| 28 | 28 | %span.author | ... | ... |
app/views/projects/_recent_messages.html.haml
| ... | ... | @@ -7,14 +7,14 @@ |
| 7 | 7 | %thead |
| 8 | 8 | %th |
| 9 | 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 | 11 | - notes.sort {|x,y| y.updated_at <=> x.updated_at }.each do |note| |
| 12 | 12 | %tr |
| 13 | 13 | %td |
| 14 | 14 | %div.message |
| 15 | 15 | = image_tag gravatar_icon(note.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" |
| 16 | 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 | 18 | - if note.attachment.url |
| 19 | 19 | %br |
| 20 | 20 | Attachment: | ... | ... |
app/views/projects/_tree_item.html.haml
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | = time_ago_in_words(content_commit.committed_date) |
| 13 | 13 | ago |
| 14 | 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 | 16 | - tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name) |
| 17 | 17 | - if tm |
| 18 | 18 | = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) | ... | ... |