diff --git a/app/assets/javascripts/note.js b/app/assets/javascripts/note.js index 7acc81e5..ef5330b7 100644 --- a/app/assets/javascripts/note.js +++ b/app/assets/javascripts/note.js @@ -42,8 +42,10 @@ replace: prepend: function(id, html) { - this.last_id = id; - $("#notes-list").prepend(html); + if(id != this.last_id) { + this.last_id = id; + $("#notes-list").prepend(html); + } }, getNew: diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index c31f795a..e5d39474 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -276,6 +276,9 @@ input.ssh_project_url { /** FORM INPUTS **/ .user_new, +.new_key, +.new_issue, +.new_note, .edit_user, .new_project, .new_snippet, @@ -667,6 +670,15 @@ table.highlighttable pre{ .cred { color:#D12F19; } .cgreen { color:#44aa22; } +body.project-page table .commit { + a.tree-commit-link { + color:gray; + &:hover { + text-decoration:underline; + } + } +} + body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} body.project-page #notes-list .note img{float: left; margin-right: 10px;} diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss index ec403eba..13f26d97 100755 --- a/app/assets/stylesheets/style.scss +++ b/app/assets/stylesheets/style.scss @@ -87,6 +87,17 @@ h2{margin: 1.5em 0} /* Forms */ input[type="text"]:focus, input[type="password"]:focus { outline: none; } input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px} + +.form-row{ + padding: 0px 0px 10px 0px; +} + +.form-row label{ + font-weight:bold; + display: inline-block; + padding: 0px 0px 5px 0px; +} + /* eo Forms */ /* Tables */ diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 70984804..70047c41 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4,6 +4,10 @@ module ApplicationHelper "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon" end + def fixed_mode? + @view_mode == :fixed + end + def body_class(default_class = nil) main = content_for(:body_class).blank? ? default_class : diff --git a/app/models/project.rb b/app/models/project.rb index de68f451..a5b6224b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -50,6 +50,11 @@ class Project < ActiveRecord::Base code end + def team_member_by_name_or_email(email = nil, name = nil) + user = users.where("email like ? or name like ?", email, name).first + users_projects.find_by_user_id(user.id) if user + end + def common_notes notes.where(:noteable_type => ["", nil]) end diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 51b5d5c7..06e5be19 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -7,44 +7,42 @@ - @admin_user.errors.full_messages.each do |msg| %li= msg - .span-24 - .span-11.colborder - .field - = f.label :name - %br - = f.text_field :name - .field - = f.label :email - %br - = f.text_field :email - .field - = f.label :password - %br - = f.password_field :password - .field - = f.label :password_confirmation - %br - = f.password_field :password_confirmation - .field.prepend-top - = f.check_box :admin - = f.label :admin - .span-11 - .field.prepend-top - = f.text_field :projects_limit, :class => "small_input" - = f.label :projects_limit + .form-row + = f.label :name + %br + = f.text_field :name + .form-row + = f.label :email + %br + = f.text_field :email + .form-row + = f.label :password + %br + = f.password_field :password + .form-row + = f.label :password_confirmation + %br + = f.password_field :password_confirmation + .form-row + = f.check_box :admin + = f.label :admin - .field - = f.label :skype - %br - = f.text_field :skype - .field - = f.label :linkedin - %br - = f.text_field :linkedin - .field - = f.label :twitter - %br - = f.text_field :twitter + .form-row + = f.text_field :projects_limit, :class => "small_input" + = f.label :projects_limit + + .form-row + = f.label :skype + %br + = f.text_field :skype + .form-row + = f.label :linkedin + %br + = f.text_field :linkedin + .form-row + = f.label :twitter + %br + = f.text_field :twitter .clear %br .actions diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index cbec1060..e12cfc77 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -21,4 +21,5 @@ %br = paginate @admin_users + = link_to 'New User', new_admin_user_path diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml index 2d393993..f47252ab 100644 --- a/app/views/commits/_commits.html.haml +++ b/app/views/commits/_commits.html.haml @@ -17,7 +17,7 @@ = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" %span.commit-title %strong - = truncate(commit.safe_message, :length => 60) + = truncate(commit.safe_message, :length => fixed_mode? ? 60 : 120) %span.commit-author %strong= commit.author_name = time_ago_in_words(commit.committed_date) diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml index 80f19d62..ffcdc028 100644 --- a/app/views/issues/_form.html.haml +++ b/app/views/issues/_form.html.haml @@ -5,24 +5,21 @@ - @issue.errors.full_messages.each do |msg| %li= msg - .span-8 + .form-row = f.label :title = f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255 - -#.span-8 - -#= f.label :content - -#= f.text_area :content, :style => "width:450px; height:130px" - .span-8.append-bottom + .form-row = f.label :assignee_id = f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) - .span-1 + .form-row = f.label :critical, "Critical" %br = f.check_box :critical - unless @issue.new_record? - .span-2.right + .form-row = f.label :closed %br = f.check_box :closed %hr - .span-6 + .form-row = f.submit 'Save', :class => "lbutton vm" diff --git a/app/views/keys/_form.html.haml b/app/views/keys/_form.html.haml index 7d3e14ef..a49164cf 100644 --- a/app/views/keys/_form.html.haml +++ b/app/views/keys/_form.html.haml @@ -5,12 +5,12 @@ - @key.errors.full_messages.each do |msg| %li= msg - .span-6 + .form-row = f.label :title = f.text_field :title, :style => "width:300px" - .span-6 + .form-row = f.label :key = f.text_area :key, :style => "width:300px; height:130px" - .span-6 + .form-row = f.submit 'Save', :class => "lbutton vm" diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 70ebb890..959cdbe9 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -26,12 +26,12 @@ - if @project.users_projects.count > 0 %span{ :class => "number" }= @project.users_projects.count = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do - Issues + Issuess - if @project.issues.opened.count > 0 %span{ :class => "number" }= @project.issues.opened.count = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do Wall - - if @project.common_notes.count > 0 + - if @project.common_nsotes.count > 0 %span{ :class => "number" }= @project.common_notes.count = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do Snippets diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml index 86f0b779..a0def20b 100644 --- a/app/views/notes/_form.html.haml +++ b/app/views/notes/_form.html.haml @@ -10,13 +10,16 @@ %div = f.label :note - %cite + %cite.cgray markdown supported + %br %br = f.text_area :note, :size => 255 - + %div.attach_holder + %br = f.label :attachment - %cite (less than 10 MB) + %cite.cgray (less than 10 MB) + %br %br = f.file_field :attachment diff --git a/app/views/profile/password.html.haml b/app/views/profile/password.html.haml index f77d3855..3e82143d 100644 --- a/app/views/profile/password.html.haml +++ b/app/views/profile/password.html.haml @@ -7,11 +7,11 @@ - @user.errors.full_messages.each do |msg| %li= msg - .div + .form-row = f.label :password %br = f.password_field :password - .div + .form-row = f.label :password_confirmation %br = f.password_field :password_confirmation diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml index ef23a169..bf45f440 100644 --- a/app/views/profile/show.html.haml +++ b/app/views/profile/show.html.haml @@ -16,15 +16,15 @@ - @user.errors.full_messages.each do |msg| %li= msg - .div + .form-row = f.label :skype %br = f.text_field :skype - .div + .form-row = f.label :linkedin %br = f.text_field :linkedin - .div + .form-row = f.label :twitter %br = f.text_field :twitter diff --git a/app/views/projects/_tree_item.html.haml b/app/views/projects/_tree_item.html.haml index 53c05d5a..273d0272 100644 --- a/app/views/projects/_tree_item.html.haml +++ b/app/views/projects/_tree_item.html.haml @@ -11,5 +11,8 @@ %td = time_ago_in_words(content_commit.committed_date) ago - %td - = link_to truncate(content_commit.safe_message, :length => 40), project_commit_path(@project, content_commit) + %td.commit + = link_to truncate(content_commit.safe_message, :length => fixed_mode? ? 40 : 80), project_commit_path(@project, content_commit), :class => "tree-commit-link" + - tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name) + - if tm + = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) diff --git a/public/.directory b/public/.directory new file mode 100644 index 00000000..8bb0b816 --- /dev/null +++ b/public/.directory @@ -0,0 +1,4 @@ +[Dolphin] +ShowPreview=true +Timestamp=2011,11,6,21,7,47 +Version=2 diff --git a/vendor/assets/stylesheets/jquery-ui/jquery-ui.css b/vendor/assets/stylesheets/jquery-ui/jquery-ui.css index a6b4c363..a94efee4 100644 --- a/vendor/assets/stylesheets/jquery-ui/jquery-ui.css +++ b/vendor/assets/stylesheets/jquery-ui/jquery-ui.css @@ -59,7 +59,7 @@ .ui-widget { font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: 1.1em; } .ui-widget .ui-widget { font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #ffffff url(ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } +.ui-widget-content { border: 1px solid #474D57; background: #ffffff url(ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } .ui-widget-content a { color: #222222; } .ui-widget-header { color: #222222; font-weight: bold; } .ui-widget-header a { color: #222222; } @@ -445,8 +445,8 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * http://docs.jquery.com/UI/Dialog#theming */ .ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #F7F7F7; color:#555; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0;} +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #474D57; color:#eee; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; text-shadow: none;} .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; background:#eaeaea} .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }