Commit 444b69dd authored by Aleksei Kvitinskii's avatar Aleksei Kvitinskii

Merge branch 'dev' into issue-184

Conflicts:
	app/views/layouts/project.html.haml
parents 4a1b70f7 9054f64c
......@@ -42,8 +42,10 @@ replace:
prepend:
function(id, html) {
if(id != this.last_id) {
this.last_id = id;
$("#notes-list").prepend(html);
}
},
getNew:
......
......@@ -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;}
......
......@@ -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 */
......
......@@ -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 :
......
......@@ -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
......
......@@ -7,41 +7,39 @@
- @admin_user.errors.full_messages.each do |msg|
%li= msg
.span-24
.span-11.colborder
.field
.form-row
= f.label :name
%br
= f.text_field :name
.field
.form-row
= f.label :email
%br
= f.text_field :email
.field
.form-row
= f.label :password
%br
= f.password_field :password
.field
.form-row
= f.label :password_confirmation
%br
= f.password_field :password_confirmation
.field.prepend-top
.form-row
= f.check_box :admin
= f.label :admin
.span-11
.field.prepend-top
.form-row
= f.text_field :projects_limit, :class => "small_input"
= f.label :projects_limit
.field
.form-row
= f.label :skype
%br
= f.text_field :skype
.field
.form-row
= f.label :linkedin
%br
= f.text_field :linkedin
.field
.form-row
= f.label :twitter
%br
= f.text_field :twitter
......
......@@ -21,4 +21,5 @@
%br
= paginate @admin_users
= link_to 'New User', new_admin_user_path
......@@ -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)
......
......@@ -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"
......@@ -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"
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
[Dolphin]
ShowPreview=true
Timestamp=2011,11,6,21,7,47
Version=2
......@@ -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; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment