Commit 8513526b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'dev'

parents 0d4128bf 3f70316c
...@@ -42,8 +42,10 @@ replace: ...@@ -42,8 +42,10 @@ replace:
prepend: prepend:
function(id, html) { function(id, html) {
this.last_id = id; if(id != this.last_id) {
$("#notes-list").prepend(html); this.last_id = id;
$("#notes-list").prepend(html);
}
}, },
getNew: getNew:
......
...@@ -40,3 +40,19 @@ $(document).ready(function(){ ...@@ -40,3 +40,19 @@ $(document).ready(function(){
function focusSearch() { function focusSearch() {
$("#search").focus(); $("#search").focus();
} }
function taggifyForm(){
var tag_field = $('#tag_field').tagify();
tag_field.tagify('inputField').autocomplete({
source: '/tags.json'
});
$('form').submit( function() {
var tag_field = $('#tag_field')
tag_field.val( tag_field.tagify('serialize') );
return true;
});
}
...@@ -276,6 +276,9 @@ input.ssh_project_url { ...@@ -276,6 +276,9 @@ input.ssh_project_url {
/** FORM INPUTS **/ /** FORM INPUTS **/
.user_new, .user_new,
.new_key,
.new_issue,
.new_note,
.edit_user, .edit_user,
.new_project, .new_project,
.new_snippet, .new_snippet,
...@@ -440,67 +443,6 @@ input.ssh_project_url { ...@@ -440,67 +443,6 @@ input.ssh_project_url {
padding: 10px; padding: 10px;
} }
.recent_message_parent {
img {
padding-right:10px;
}
float: left;
margin: 0 20px 20px 0px;
padding: 5px 0px;;
width: 420px;
&.dash_wall{
border-bottom: 2px solid orange;
span {
background: orange;
color:black;
}
}
&.dash_issue{
border-bottom: 2px solid #ffbbbb;
span {
background: #ffbbbb;
}
}
&.dash_commit{
border-bottom: 2px solid #bbbbff;
span{
background: #bbbbff;
}
}
&.dash_snippet{
border-bottom: 2px solid #bbffbb;
span{
background: #bbffbb;
}
}
span{
border: 1px solid #aaa;
color:black;
padding:1px 4px;
}
h4 {
margin-bottom:3px;
}
}
.commit,
.message{
.author {
background: #eaeaea;
color: #333;
border: 1px solid #aaa;
padding:1px 2px;
margin-right:5px;
}
}
/* Note textare */ /* Note textare */
#note_note { #note_note {
...@@ -662,6 +604,8 @@ table.highlighttable pre{ ...@@ -662,6 +604,8 @@ table.highlighttable pre{
margin-right:15px; margin-right:15px;
} }
} }
.filter .left { margin-right:15px; }
.cgray { color:gray; } .cgray { color:gray; }
.cred { color:#D12F19; } .cred { color:#D12F19; }
...@@ -676,6 +620,30 @@ body.project-page table .commit { ...@@ -676,6 +620,30 @@ body.project-page table .commit {
} }
} }
#notes-list .note .delete-note { display:none; }
#notes-list .note:hover .delete-note { display:block; }
#issues-table-holder .issue .action-links {
display:none;
a {
margin-left:10px;
}
}
.issue-number {
float: left;
border-radius: 5px;
text-shadow: none;
background: rgba(0, 0, 0, 0.12);
text-align: center;
padding: 14px 8px;
width: 40px;
margin-right: 10px;
color: #444;
}
#issues-table-holder .issue:hover .action-links { 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 {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 {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}
body.project-page #notes-list .note img{float: left; margin-right: 10px;} body.project-page #notes-list .note img{float: left; margin-right: 10px;}
...@@ -683,3 +651,33 @@ body.project-page #notes-list .note span.note-title{display: block;} ...@@ -683,3 +651,33 @@ body.project-page #notes-list .note span.note-title{display: block;}
body.project-page #notes-list .note span.note-title{margin-bottom: 10px} body.project-page #notes-list .note span.note-title{margin-bottom: 10px}
body.project-page #notes-list .note span.note-author{color: #999; font-weight: normal; font-style: italic;} body.project-page #notes-list .note span.note-author{color: #999; font-weight: normal; font-style: italic;}
body.project-page #notes-list .note span.note-author strong{font-weight: bold; font-style: normal;} body.project-page #notes-list .note span.note-author strong{font-weight: bold; font-style: normal;}
/** NEW PROJECT **/
.new-project-hodler {
.icon span {
background-position: -31px -70px;
}
td {
border-bottom: 1px solid #DEE2E3;
}
}
//.message .note-title p { margin-bottom:0px; }
.commit,
.message {
.title {
color:#666;
a {
color:#666 !important;
}
p {
margin-top:0px;
}
}
.author {
color: #999
}
}
...@@ -87,6 +87,17 @@ h2{margin: 1.5em 0} ...@@ -87,6 +87,17 @@ h2{margin: 1.5em 0}
/* Forms */ /* Forms */
input[type="text"]:focus, input[type="password"]:focus { outline: none; } input[type="text"]:focus, input[type="password"]:focus { outline: none; }
input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px} 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 */ /* eo Forms */
/* Tables */ /* Tables */
......
...@@ -27,4 +27,18 @@ ...@@ -27,4 +27,18 @@
color: #FFF; color: #FFF;
text-shadow: none; text-shadow: none;
font-weight: bold; font-weight: bold;
}
.medium-tags a{
font-size: 12px;
display: inline-block;
padding: 3px 4px 2px 4px;
margin: 0px 7px 8px 0px;
border-radius: 3px;
background-color: #72bbdf;
color: #FFF;
text-shadow: none;
font-weight: bold;
} }
\ No newline at end of file
...@@ -47,6 +47,7 @@ class IssuesController < ApplicationController ...@@ -47,6 +47,7 @@ class IssuesController < ApplicationController
def create def create
@issue = @project.issues.new(params[:issue]) @issue = @project.issues.new(params[:issue])
@issue.author = current_user @issue.author = current_user
if @issue.save && @issue.assignee != current_user if @issue.save && @issue.assignee != current_user
Notify.new_issue_email(@issue).deliver Notify.new_issue_email(@issue).deliver
end end
......
...@@ -12,7 +12,7 @@ module DashboardHelper ...@@ -12,7 +12,7 @@ module DashboardHelper
when "Commit" then project_commit_path(project, :id => note.noteable_id) when "Commit" then project_commit_path(project, :id => note.noteable_id)
else wall_project_path(project) else wall_project_path(project)
end end
else "#" else wall_project_path(project)
end end
rescue rescue
"#" "#"
...@@ -23,7 +23,7 @@ module DashboardHelper ...@@ -23,7 +23,7 @@ module DashboardHelper
when "Note" then markdown(object.note) when "Note" then markdown(object.note)
when "Issue" then object.title when "Issue" then object.title
when "Grit::Commit" then object.safe_message when "Grit::Commit" then object.safe_message
else "" else return "Project Wall"
end end
"[#{object.class.name}] #{truncate(sanitize(title, :tags => []), :length => 60)} " "[#{object.class.name}] #{truncate(sanitize(title, :tags => []), :length => 60)} "
end end
......
module IssuesHelper module IssuesHelper
def sort_class
if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0")
"handle"
end
end
def project_issues_filter_path project, params = {}
params[:f] ||= cookies['issue_filter']
project_issues_path project, params
end
end end
module TagsHelper
def tag_path tag
"/tags/#{tag}"
end
def tag_list project
html = ''
project.tag_list.each do |tag|
html += link_to tag, tag_path(tag)
end
html.html_safe
end
end
= form_for [:admin, @admin_project] do |f| = form_for [:admin, @admin_project] do |f|
-if @admin_project.errors.any? -if @admin_project.errors.any?
#error_explanation #error_explanation
%h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:" %h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:"
%ul %ul
- @admin_project.errors.full_messages.each do |msg| - @admin_project.errors.full_messages.each do |msg|
%li= msg %li= msg
.span-24 .form-row
.span-12 = f.label :name
.field %br
= f.label :name = f.text_field :name
%br .form-row
= f.text_field :name = f.label :code
.field %br
= f.label :code = f.text_field :code
%br .form-row
= f.text_field :code = f.label :path
.field %br
= f.label :path = f.text_field :path
%br
= f.text_field :path
.span-10 .form-row
.field = f.label :tag_list
= f.label :description %br
%br = f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
= f.text_area :description
.form-row
= f.label :description
%br
= f.text_area :description
.clear .clear
.actions .actions
= f.submit 'Save', :class => "lbutton" = f.submit 'Save', :class => "lbutton"
:javascript
$(function(){
taggifyForm();
})
...@@ -7,44 +7,42 @@ ...@@ -7,44 +7,42 @@
- @admin_user.errors.full_messages.each do |msg| - @admin_user.errors.full_messages.each do |msg|
%li= msg %li= msg
.span-24 .form-row
.span-11.colborder = f.label :name
.field %br
= f.label :name = f.text_field :name
%br .form-row
= f.text_field :name = f.label :email
.field %br
= f.label :email = f.text_field :email
%br .form-row
= f.text_field :email = f.label :password
.field %br
= f.label :password = f.password_field :password
%br .form-row
= f.password_field :password = f.label :password_confirmation
.field %br
= f.label :password_confirmation = f.password_field :password_confirmation
%br .form-row
= f.password_field :password_confirmation = f.check_box :admin
.field.prepend-top = f.label :admin
= f.check_box :admin
= f.label :admin
.span-11
.field.prepend-top
= f.text_field :projects_limit, :class => "small_input"
= f.label :projects_limit
.field .form-row
= f.label :skype = f.text_field :projects_limit, :class => "small_input"
%br = f.label :projects_limit
= f.text_field :skype
.field .form-row
= f.label :linkedin = f.label :skype
%br %br
= f.text_field :linkedin = f.text_field :skype
.field .form-row
= f.label :twitter = f.label :linkedin
%br %br
= f.text_field :twitter = f.text_field :linkedin
.form-row
= f.label :twitter
%br
= f.text_field :twitter
.clear .clear
%br %br
.actions .actions
......
...@@ -21,4 +21,5 @@ ...@@ -21,4 +21,5 @@
%br %br
= paginate @admin_users = paginate @admin_users
= link_to 'New User', new_admin_user_path = link_to 'New User', new_admin_user_path
...@@ -13,10 +13,8 @@ ...@@ -13,10 +13,8 @@
= diff_line(line, line_new, line_old) = diff_line(line, line_new, line_old)
- if line[0] == "+" - if line[0] == "+"
- line_new += 1 - line_new += 1
- elsif - elsif line[0] == "-"
- line[0] == "-"
- line_old += 1 - line_old += 1
- else - else
- line_new += 1 - line_new += 1
- line_old += 1 - line_old += 1
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.project-box.project-updates.ui-box.ui-box-small.ui-box-big .project-box.project-updates.ui-box.ui-box-small.ui-box-big
%h3= project.name %h3= project.name
.data .data
- project.updates.each do |update| - project.updates(4).each do |update|
%a.project-update{:href => dashboard_feed_path(project, update)} %a.project-update{:href => dashboard_feed_path(project, update)}
= image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
%span.update-title %span.update-title
...@@ -34,7 +34,5 @@ ...@@ -34,7 +34,5 @@
= time_ago_in_words(update.created_at) = time_ago_in_words(update.created_at)
ago ago
%br %br
/ .project-update
/ .project-updates
/ #news-feed / #news-feed
/ #dashboard-content / #dashboard-content
...@@ -5,24 +5,21 @@ ...@@ -5,24 +5,21 @@
- @issue.errors.full_messages.each do |msg| - @issue.errors.full_messages.each do |msg|
%li= msg %li= msg
.span-8 .form-row
= f.label :title = f.label :title
= f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255 = f.text_area :title, :style => "width:450px; height:100px", :maxlength => 255
-#.span-8 .form-row
-#= f.label :content
-#= f.text_area :content, :style => "width:450px; height:130px"
.span-8.append-bottom
= f.label :assignee_id = f.label :assignee_id
= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) = 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" = f.label :critical, "Critical"
%br %br
= f.check_box :critical = f.check_box :critical
- unless @issue.new_record? - unless @issue.new_record?
.span-2.right .form-row
= f.label :closed = f.label :closed
%br %br
= f.check_box :closed = f.check_box :closed
%hr %hr
.span-6 .form-row
= f.submit 'Save', :class => "lbutton vm" = f.submit 'Save', :class => "lbutton vm"
%table.round-borders#issues-table - @issues.critical.each do |issue|
%thead = render(:partial => 'show', :locals => {:issue => issue})
- if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0"
%th
%th Assignee
%th ID
%th Title
%th Closed?
- @issues.critical.each do |issue| - @issues.non_critical.each do |issue|
= render(:partial => 'show', :locals => {:issue => issue}) = render(:partial => 'show', :locals => {:issue => issue})
- @issues.non_critical.each do |issue|
= render(:partial => 'show', :locals => {:issue => issue})
%tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(@project, issue) } %tr{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(@project, issue) }
- if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0")
%td
= image_tag "move.png" , :class => [:handle, :left]
%td %td
= image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" %strong.issue-number{:class => sort_class}= "##{issue.id}"
= issue.assignee.name %span
%td ##{issue.id} = truncate(html_escape(issue.title), :length => fixed_mode? ? 100 : 200)
%td
= truncate(html_escape(issue.title), :length => 200)
%br %br
%br %br
- if issue.critical %div.note-author
%span.tag.high critical %strong= issue.assignee.name
- if issue.today? %cite.cgray
%span.tag.today today = time_ago_in_words(issue.updated_at)
ago
.right - if issue.critical
- if can?(current_user, :admin_issue, @project) || issue.author == current_user %span.tag.high critical
= link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true - if issue.today?
- if can?(current_user, :admin_issue, @project) || issue.author == current_user %span.tag.today today
&nbsp; .right.action-links
= link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}" - if can? current_user, :write_issue, issue
- if issue.closed
-#- if issue.author == current_user = link_to 'Reopen', project_issue_path(@project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true
-#%span.tag.yours yours - else
-#- if issue.notes.count > 0 = link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true
-#%span.tag.notes - if can? current_user, :write_issue, issue
-#= issue.notes.count = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray edit-issue-link", :remote => true
-#notes - if can?(current_user, :admin_issue, @project) || issue.author == current_user
%td = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
- if can? current_user, :write_issue, @project
= form_for([@project, issue], :remote => true) do |f|
= f.check_box :closed, :onclick => "$(this).parent().submit();"
= hidden_field_tag :status_only, true
- else
= check_box_tag "closed", 1, issue.closed, :disabled => true
- if @issue.valid? - if @issue.valid?
:plain :plain
$("#new_issue_dialog").dialog("close"); $("#new_issue_dialog").dialog("close");
$("#issues-table").prepend("#{escape_javascript(render(:partial => 'show', :locals => {:issue => @issue} ))}");
$.ajax({type: "GET", url: location.href, dataType: "script"}); $.ajax({type: "GET", url: location.href, dataType: "script"});
- else - else
:plain :plain
......
%div %div#issues-table-holder
.top_panel_issues %table.round-borders#issues-table
- if can? current_user, :write_issue, @project %thead
%div{:class => "left", :style => "margin-right: 10px;" } %th
= link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm" .top_panel_issues
= form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do - if can? current_user, :write_issue, @project
= hidden_field_tag :project_id, @project.id, { :id => 'project_id' } %div{:class => "left", :style => "margin-right: 10px;" }
= search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' } = link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm"
= form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do
= hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
= search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' }
.right.issues_filter .right.issues_filter
= form_tag project_issues_path(@project), :method => :get do = form_tag project_issues_path(@project), :method => :get do
.left .left
= radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status" = radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "setIssueFilter(this.form, 0)", :id => "open_issues", :class => "status"
= label_tag "open_issues","Open" = label_tag "open_issues","Open"
.left .left
= radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status" = radio_button_tag :f, 2, params[:f] == "2", :onclick => "setIssueFilter(this.form, 2)", :id => "closed_issues", :class => "status"
= label_tag "closed_issues","Closed" = label_tag "closed_issues","Closed"
.left .left
= radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status" = radio_button_tag :f, 3, params[:f] == "3", :onclick => "setIssueFilter(this.form, 3)", :id => "my_issues", :class => "status"
= label_tag "my_issues","To Me" = label_tag "my_issues","To Me"
.left .left
= radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status" = radio_button_tag :f, 1, params[:f] == "1", :onclick => "setIssueFilter(this.form, 1)", :id => "all_issues", :class => "status"
= label_tag "all_issues","All" = label_tag "all_issues","All"
#issues-table-holder= render "issues" = render "issues"
%br %br
:javascript :javascript
var href = $('.issue_search').parent().attr('action'); var href = $('.issue_search').parent().attr('action');
var last_terms = ''; var last_terms = '';
var setIssueFilter = function(form, value){
$.cookie('issue_filter', value, { expires: 140 });
form.submit();
}
$('.issue_search').keyup(function() { $('.issue_search').keyup(function() {
var terms = $(this).val(); var terms = $(this).val();
var project_id = $('#project_id').val(); var project_id = $('#project_id').val();
...@@ -37,7 +46,7 @@ ...@@ -37,7 +46,7 @@
if (terms.length >= 2 || terms.length == 0) { if (terms.length >= 2 || terms.length == 0) {
$.get(href, { 'status': status, 'terms': terms, project: project_id }, function(response) { $.get(href, { 'status': status, 'terms': terms, project: project_id }, function(response) {
$('#issues-table').html(response); $('#issues-table tbody').html(response);
setSortable(); setSortable();
}); });
} }
......
:plain :plain
$('#issues-table-holder').html("#{escape_javascript(render('issues'))}"); $('#issues-table tbody').html("#{escape_javascript(render('issues'))}");
setSortable(); setSortable();
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
- @key.errors.full_messages.each do |msg| - @key.errors.full_messages.each do |msg|
%li= msg %li= msg
.span-6 .form-row
= f.label :title = f.label :title
= f.text_field :title, :style => "width:300px" = f.text_field :title, :style => "width:300px"
.span-6 .form-row
= f.label :key = f.label :key
= f.text_area :key, :style => "width:300px; height:130px" = f.text_area :key, :style => "width:300px; height:130px"
.span-6 .form-row
= f.submit 'Save', :class => "lbutton vm" = f.submit 'Save', :class => "lbutton vm"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
Team Team
- if @project.users_projects.count > 0 - if @project.users_projects.count > 0
%span{ :class => "number" }= @project.users_projects.count %span{ :class => "number" }= @project.users_projects.count
= link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do
Issues Issues
- if @project.issues.opened.count > 0 - if @project.issues.opened.count > 0
%span{ :class => "number" }= @project.issues.opened.count %span{ :class => "number" }= @project.issues.opened.count
...@@ -40,5 +40,7 @@ ...@@ -40,5 +40,7 @@
- if @commit - if @commit
= link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil = link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil
.medium-tags{:style => 'padding: 10px 0 0 10px; width: 210px;'}= tag_list @project
.project-content .project-content
= yield = yield
...@@ -10,13 +10,16 @@ ...@@ -10,13 +10,16 @@
%div %div
= f.label :note = f.label :note
%cite %cite.cgray markdown supported
%br
%br %br
= f.text_area :note, :size => 255 = f.text_area :note, :size => 255
%div.attach_holder %div.attach_holder
%br
= f.label :attachment = f.label :attachment
%cite (less than 10 MB) %cite.cgray (less than 10 MB)
%br
%br %br
= f.file_field :attachment = f.file_field :attachment
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
- @user.errors.full_messages.each do |msg| - @user.errors.full_messages.each do |msg|
%li= msg %li= msg
.div .form-row
= f.label :password = f.label :password
%br %br
= f.password_field :password = f.password_field :password
.div .form-row
= f.label :password_confirmation = f.label :password_confirmation
%br %br
= f.password_field :password_confirmation = f.password_field :password_confirmation
......
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
- @user.errors.full_messages.each do |msg| - @user.errors.full_messages.each do |msg|
%li= msg %li= msg
.div .form-row
= f.label :skype = f.label :skype
%br %br
= f.text_field :skype = f.text_field :skype
.div .form-row
= f.label :linkedin = f.label :linkedin
%br %br
= f.text_field :linkedin = f.text_field :linkedin
.div .form-row
= f.label :twitter = f.label :twitter
%br %br
= f.text_field :twitter = f.text_field :twitter
......
= form_for(@project, :remote => true) do |f| = form_for(@project, :remote => true) do |f|
%div.form_content %div.form_content
- unless @project.new_record? - unless @project.new_record?
%h1 Edit Project %h2.icon
%span
= @project.name
- if @project.errors.any? - if @project.errors.any?
#error_explanation #error_explanation
%h2 %h2
...@@ -10,7 +12,7 @@ ...@@ -10,7 +12,7 @@
%ul %ul
- @project.errors.full_messages.each do |msg| - @project.errors.full_messages.each do |msg|
%li= msg %li= msg
%table.round-borders %table
%tr %tr
%td= f.label :name %td= f.label :name
%td= f.text_field :name, :placeholder => "Example Project" %td= f.text_field :name, :placeholder => "Example Project"
...@@ -29,15 +31,13 @@ ...@@ -29,15 +31,13 @@
%tr %tr
%td= f.label :tag_list %td= f.label :tag_list
%td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field %td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
%tr
%td= f.label :description
%td= f.text_area :description, :placeholder => "project description", :style => "height:50px"
.field %br
= f.label :description
%br/
= f.text_area :description, :style => "height:140px;width:932px;"
.clear
%hr.prepend-top
.actions .actions
= f.submit :class => "lbutton vm" = f.submit :class => "button"
%div{ :class => "ajax_loader", :style => "display:none;height:200px;"} %div{ :class => "ajax_loader", :style => "display:none;height:200px;"}
%center %center
...@@ -55,16 +55,5 @@ ...@@ -55,16 +55,5 @@
:javascript :javascript
$(function(){ $(function(){
var tag_field = $('#tag_field').tagify(); taggifyForm();
tag_field.tagify('inputField').autocomplete({
source: '/tags.json'
});
$('form').submit( function() {
var tag_field = $('#tag_field')
tag_field.val( tag_field.tagify('serialize') );
return true;
});
}) })
...@@ -12,9 +12,8 @@ ...@@ -12,9 +12,8 @@
%tr{ :class => "project", :url => project_path(project) } %tr{ :class => "project", :url => project_path(project) }
%td %td
= project.name = project.name
.small-tags .small-tags= tag_list project
- project.tag_list.each do |tag|
= link_to tag, "/tags/#{tag}"
%td= truncate project.url_to_repo %td= truncate project.url_to_repo
%td= project.code %td= project.code
......
- @commits.each do |commit| %table
%div.commit %thead
- if commit.author.email %th
= image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" Commits
- else .filter.right
= image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" = form_tag project_path(@project), :method => :get, :class => "right" do
%p{:style => "margin-bottom: 3px;"} .left
%strong = radio_button_tag :view, "recent", (params[:view] || "recent") == "recent", :onclick => "this.form.submit()", :id => "recent_view"
= link_to truncate(commit.safe_message, :length => 60), project_commit_path(@project, :id => commit.id) = label_tag "recent_view","Recent"
.left
%span = radio_button_tag :view, "day", params[:view] == "day", :onclick => "this.form.submit()", :id => "day_view"
%span.author = label_tag "day_view","Today"
= commit.author.name.force_encoding("UTF-8") .left
%cite = radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view"
= time_ago_in_words(commit.committed_date) = label_tag "week_view","Week"
ago - @commits.each do |commit|
%br %tr
%td
%div.commit
- if commit.author.email
= image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
- else
= image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
.title
%p= link_to truncate(commit.safe_message, :length => fixed_mode? ? 40 : 100), project_commit_path(@project, :id => commit.id)
%span
%span.author
%strong= commit.author.name.force_encoding("UTF-8")
%cite.cgray
= time_ago_in_words(commit.committed_date)
ago
...@@ -3,50 +3,25 @@ ...@@ -3,50 +3,25 @@
- parent = load_note_parent(id, type, @project) - parent = load_note_parent(id, type, @project)
- next unless parent - next unless parent
- case type %table
- when "Issue" %thead
- css_class = "dash_issue" %th
- issue = parent %div{ :class => "recent_message_parent"}
- item_code = issue.author.email = link_to(truncate(dashboard_feed_title(parent), :length => fixed_mode? ? 40 : 100 ), dashboard_feed_path(@project, parent))
- link_item_name = truncate(issue.title, :length => 50) - notes.sort {|x,y| y.updated_at <=> x.updated_at }.each do |note|
- link_to_item = project_issue_path(@project, issue) %tr
- when "Snippet" %td
- css_class = "dash_snippet" %div.message
- item_code = parent.author.email = image_tag gravatar_icon(note.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
- link_item_name = parent.title %div.title
- link_to_item = project_snippet_path(@project, parent) = link_to markdown(truncate(note.note, :length => fixed_mode? ? 40 : 100)), dashboard_feed_path(@project, parent) + "#note_#{note.id}"
- when "Commit" - if note.attachment.url
- css_class = "dash_commit" %br
- commit = parent Attachment:
- item_code = commit.author.email = link_to note.attachment_identifier, note.attachment.url
- link_item_name = truncate(commit.safe_message, :length => 50) %div.author
- link_to_item = project_commit_path(@project, :id => commit.id) %strong= note.author_name
- else %cite.cgray
- css_class = "dash_wall" = time_ago_in_words(note.updated_at)
- item_code = @project.name ago
- link_item_name = "Project Wall" %br
- link_to_item = wall_project_path(@project)
%div{ :class => "recent_message_parent #{css_class}"}
= image_tag gravatar_icon(item_code), :class => "left", :width => 40
%h4
= link_to(link_item_name, link_to_item)
%span
= type
.clear
- notes.sort {|x,y| x.updated_at <=> y.updated_at }.each do |note|
%div.message
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;"
%p{:style => "margin-bottom: 3px;"}
%span.author
= note.author.name
= link_to markdown(truncate(note.note, :length => 200)), link_to_item + "#note_#{note.id}"
- if note.attachment.url
%br
Attachment:
= link_to note.attachment_identifier, note.attachment.url
%br
%br
.append-bottom
&nbsp;
.clear
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
- last_note = project.notes.last - last_note = project.notes.last
= last_note ? last_note.created_at.stamp("24 Aug, 2011") : "Never" = last_note ? last_note.created_at.stamp("24 Aug, 2011") : "Never"
%p.small-tags %p.small-tags= tag_list project
- project.tag_list.each do |tag|
= link_to tag, "/tags/#{tag}"
.buttons .buttons
%a.browse-code.button.yellow{:href => tree_project_path(project)} Browse code %a.browse-code.button.yellow{:href => tree_project_path(project)} Browse code
......
<%= render 'form' %>
.new-project-hodler
.container_4
%h2.icon
%span
New Project
%div.clear
= render 'form'
%div
%h2.left History
.right
= form_tag project_path(@project), :method => :get do
.span-2
= radio_button_tag :view, "recent", (params[:view] || "recent") == "recent", :onclick => "this.form.submit()", :id => "recent_view"
= label_tag "recent_view","Recent"
.span-2
= radio_button_tag :view, "day", params[:view] == "day", :onclick => "this.form.submit()", :id => "day_view"
= label_tag "day_view","Today"
.span-2
= radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view"
= label_tag "week_view","Week"
.clear
%hr
.left.width-49p .left.width-49p
%h3 Commits
=render "projects/recent_commits" =render "projects/recent_commits"
.right.width-49p .right.width-49p
%h3 Talk
=render "projects/recent_messages" =render "projects/recent_messages"
:javascript :javascript
function updateDashboard(){ function updateDashboard(){
$('#content-container').load("#{escape_javascript(project_path(@project))} #content-container>*"); $('.project-content').load("#{escape_javascript(project_path(@project))} .project-content>*");
} }
setInterval("updateDashboard()", 300000); setInterval("updateDashboard()", 300000);
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
.tags-list .tags-list
- @tags.all.each do |tag| - @tags.all.each do |tag|
= link_to "#{tag.name}(#{tag.count})", "/tags/#{tag.name}" = link_to "#{tag.name}(#{tag.count})", tag_path(name)
[Dolphin]
ShowPreview=true
Timestamp=2011,11,6,21,7,47
Version=2
...@@ -158,7 +158,6 @@ describe "Issues" do ...@@ -158,7 +158,6 @@ describe "Issues" do
it "should have valid show page for issue" do it "should have valid show page for issue" do
page.should have_content @issue.title page.should have_content @issue.title
page.should have_content @user.name page.should have_content @user.name
page.should have_content "today"
end end
end end
...@@ -169,6 +168,7 @@ describe "Issues" do ...@@ -169,6 +168,7 @@ describe "Issues" do
:assignee => @user, :assignee => @user,
:project => project :project => project
visit project_issues_path(project) visit project_issues_path(project)
page.execute_script("$('.action-links').css('display', 'block');")
click_link "Edit" click_link "Edit"
end end
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
.ui-widget { font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: 1.1em; } .ui-widget { font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 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 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-content a { color: #222222; }
.ui-widget-header { color: #222222; font-weight: bold; } .ui-widget-header { color: #222222; font-weight: bold; }
.ui-widget-header a { color: #222222; } .ui-widget-header a { color: #222222; }
...@@ -445,8 +445,8 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad ...@@ -445,8 +445,8 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
* http://docs.jquery.com/UI/Dialog#theming * http://docs.jquery.com/UI/Dialog#theming
*/ */
.ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; } .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-titlebar { padding: .4em 1em; position: relative; background: #474D57; color:#eee; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0;} .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 { 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 span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .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