Merge branch 'dev'
This commit is contained in:
commit
63c2c2cc23
59 changed files with 2086 additions and 350 deletions
|
@ -17,9 +17,8 @@
|
|||
= 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)
|
||||
ago
|
||||
= more_commits_link if @commits.size > 99
|
||||
|
|
|
@ -1,33 +1,28 @@
|
|||
- content_for(:body_class, "project-page commits-page")
|
||||
|
||||
.left
|
||||
= form_tag project_commits_path(@project), :method => :get do
|
||||
= select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches"
|
||||
.left
|
||||
= form_tag project_commits_path(@project), :method => :get do
|
||||
= select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags"
|
||||
.clear
|
||||
|
||||
%br
|
||||
|
||||
|
||||
-#%a.right.button{:href => "#"} Download
|
||||
-#-if can? current_user, :admin_project, @project
|
||||
%a.right.button.blue{:href => "#"} EDIT
|
||||
%h2.icon
|
||||
%span
|
||||
%a.project-name{:href => "#"}
|
||||
%i.arrow>
|
||||
Project
|
||||
|
||||
%d
|
||||
%a{:href => "#"}
|
||||
= @ref
|
||||
- if params[:path]
|
||||
|
||||
%d
|
||||
= link_to project_commits_path(@project) do
|
||||
= @project.name
|
||||
- if params[:path]
|
||||
\/
|
||||
%a{:href => "#"}= params[:path].split("/").join(" / ")
|
||||
|
||||
.right= render :partial => "projects/refs", :locals => { :destination => project_commits_path(@project) }
|
||||
|
||||
%div{:id => dom_id(@project)}
|
||||
= render "commits"
|
||||
#commits_list= render "commits"
|
||||
.clear
|
||||
.loading{ :style => "display:none;"}
|
||||
%center= image_tag "ajax-loader.gif"
|
||||
|
||||
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
CommitsList.init("#{@ref}", 20);
|
||||
});
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
$("#more-commits-link").remove();
|
||||
$('#<%= dom_id(@project)%>').append('<%= escape_javascript(render("commits")) %>');
|
3
app/views/commits/index.js.haml
Normal file
3
app/views/commits/index.js.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
:plain
|
||||
CommitsList.append(#{@commits.count}, "#{escape_javascript(render(:partial => 'commits/commits'))}");
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
%h3
|
||||
= "[ #{@commit.committer} ] #{truncate(@commit.safe_message)}"
|
||||
= "[ #{@commit.author_name} ] #{truncate(@commit.safe_message, :length => 70)}"
|
||||
-#= link_to 'Back', project_commits_path(@project), :class => "button"
|
||||
%table.round-borders
|
||||
%tr
|
||||
|
@ -8,12 +8,9 @@
|
|||
%tr
|
||||
%td Author
|
||||
%td= @commit.author_name
|
||||
%tr
|
||||
%td Commiter
|
||||
%td= @commit.committer
|
||||
%tr
|
||||
%td Commited Date
|
||||
%td= @commit.committed_date
|
||||
%td= @commit.committed_date.stamp("21 Aug 2011, 11:15pm")
|
||||
%tr
|
||||
%td Message
|
||||
%td
|
||||
|
@ -24,18 +21,7 @@
|
|||
%td= link_to 'Browse Code', tree_project_path(@project, :commit_id => @commit.id)
|
||||
.clear
|
||||
|
||||
#tabs
|
||||
%ul
|
||||
%li
|
||||
%a{ :href => "#tabs-1" } Diff
|
||||
%li
|
||||
%a{ :href => "#tabs-2" } Comments
|
||||
%span{ :class => "notes_count" }= @notes.count
|
||||
%hr
|
||||
#tabs-1
|
||||
= render "commits/diff"
|
||||
#tabs-2
|
||||
= render "notes/notes"
|
||||
%br
|
||||
|
||||
:javascript
|
||||
$(function() { $( "#tabs" ).tabs(); });
|
||||
= render "commits/diff"
|
||||
= render "notes/notes"
|
||||
|
|
|
@ -1,8 +1 @@
|
|||
-#:plain
|
||||
$("#side-commit-preview").remove();
|
||||
var side = $("<div id='side-commit-preview'></div>");
|
||||
side.html("#{escape_javascript(render "commits/show")}");
|
||||
$("##{dom_id(@project)}").parent().append(side);
|
||||
$("##{dom_id(@project)}").addClass("span-14");
|
||||
:plain
|
||||
$("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
= render "notes/load"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
%th ID
|
||||
%th Title
|
||||
%th Closed?
|
||||
%th
|
||||
|
||||
- @issues.critical.each do |issue|
|
||||
= render(:partial => 'show', :locals => {:issue => issue})
|
||||
|
|
|
@ -4,15 +4,24 @@
|
|||
= image_tag "move.png" , :class => [:handle, :left]
|
||||
%td
|
||||
= image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
||||
= truncate issue.assignee.name, :lenght => 20
|
||||
= issue.assignee.name
|
||||
%td ##{issue.id}
|
||||
%td
|
||||
= truncate(html_escape(issue.title), :length => 60)
|
||||
= truncate(html_escape(issue.title), :length => 200)
|
||||
%br
|
||||
%br
|
||||
- if issue.critical
|
||||
%span.tag.high critical
|
||||
- if issue.today?
|
||||
%span.tag.today today
|
||||
|
||||
.right
|
||||
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
|
||||
= link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray", :remote => true
|
||||
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
|
||||
|
||||
= link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
|
||||
|
||||
-#- if issue.author == current_user
|
||||
-#%span.tag.yours yours
|
||||
-#- if issue.notes.count > 0
|
||||
|
@ -26,8 +35,3 @@
|
|||
= hidden_field_tag :status_only, true
|
||||
- else
|
||||
= check_box_tag "closed", 1, issue.closed, :disabled => true
|
||||
%td
|
||||
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
|
||||
= link_to 'Edit', edit_project_issue_path(@project, issue), :class => "lbutton positive", :remote => true
|
||||
- if can?(current_user, :admin_issue, @project) || issue.author == current_user
|
||||
= link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{issue.id}"
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
= hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
|
||||
= search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' }
|
||||
|
||||
.right
|
||||
.right.issues_filter
|
||||
= form_tag project_issues_path(@project), :method => :get do
|
||||
.span-2
|
||||
.left
|
||||
= radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status"
|
||||
= label_tag "open_issues","Open"
|
||||
.span-2
|
||||
.left
|
||||
= radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status"
|
||||
= label_tag "closed_issues","Closed"
|
||||
.span-2
|
||||
.left
|
||||
= radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status"
|
||||
= label_tag "my_issues","To Me"
|
||||
.span-2
|
||||
.left
|
||||
= radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status"
|
||||
= label_tag "all_issues","All"
|
||||
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
%h2
|
||||
= "Issue ##{@issue.id} - #{html_escape(@issue.title)}"
|
||||
%strong
|
||||
Issue
|
||||
= "##{@issue.id}"
|
||||
–
|
||||
= html_escape(@issue.title)
|
||||
.left.width-65p
|
||||
-#= simple_format html_escape(@issue.content)
|
||||
.issue_notes= render "notes/notes"
|
||||
|
||||
.loading{ :style => "display:none;"}
|
||||
%center= image_tag "ajax-loader.gif"
|
||||
.right.width-30p
|
||||
.span-8
|
||||
- if @issue.closed
|
||||
%center.success Closed
|
||||
- else
|
||||
%center.error Open
|
||||
%table.round-borders
|
||||
%tr
|
||||
%td Title:
|
||||
%td
|
||||
= truncate html_escape(@issue.title)
|
||||
%tr
|
||||
%td Project
|
||||
%td
|
||||
%strong= @issue.project.name
|
||||
%tr
|
||||
%td Author:
|
||||
%td
|
||||
|
@ -41,7 +35,7 @@
|
|||
%tr
|
||||
%td Closed?
|
||||
%td
|
||||
- if can? current_user, :write_issue, @project
|
||||
- if can? current_user, :write_issue, @issue
|
||||
= form_for([@project, @issue]) do |f|
|
||||
= f.check_box :closed, :onclick => "$(this).parent().submit();"
|
||||
= hidden_field_tag :status_only, true
|
||||
|
@ -49,9 +43,9 @@
|
|||
= check_box_tag "closed", 1, @issue.closed, :disabled => true
|
||||
|
||||
|
||||
- if can?(current_user, :admin_issue, @issue)
|
||||
- if can?(current_user, :write_issue, @issue)
|
||||
.clear
|
||||
= link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true
|
||||
.right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}"
|
||||
%br
|
||||
= link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true
|
||||
.right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}"
|
||||
.clear
|
||||
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
:plain
|
||||
$("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
= render "notes/load"
|
||||
|
|
|
@ -1,19 +1,29 @@
|
|||
<!-- Page Header -->
|
||||
<header>
|
||||
<h1 class="logo">
|
||||
<a href="/">GITLAB</a></h1>
|
||||
<div class="login-top">
|
||||
<%= link_to profile_path, :class => "pic" do %>
|
||||
<%= image_tag gravatar_icon(current_user.email) %>
|
||||
<% end %>
|
||||
<%= link_to profile_path, :class => "username" do %>
|
||||
<%= current_user.name %>
|
||||
<% end %>
|
||||
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
|
||||
<h1 class="logo">
|
||||
<a href="/">GITLAB</a>
|
||||
</h1>
|
||||
<div class="account-box">
|
||||
<%= link_to profile_path, :class => "pic" do %>
|
||||
<%= image_tag gravatar_icon(current_user.email) %>
|
||||
<% end %>
|
||||
|
||||
<a href="#" class="arrow-up"></a>
|
||||
|
||||
<div class="account-links">
|
||||
<%= link_to profile_path, :class => "username" do %>
|
||||
<%#= current_user.name %>
|
||||
Your profile
|
||||
<% end %>
|
||||
<%= link_to "Fluid layout", url_for( :view_style => 'fluid' ) if cookies[:view_style] == "collapsed"%>
|
||||
<%= link_to "Fixed layout", url_for( :view_style => 'collapsed' ) unless cookies[:view_style] == "collapsed"%>
|
||||
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
|
||||
</div>
|
||||
<div class="search">
|
||||
<%= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" %>
|
||||
</div>
|
||||
</div><!-- .account-box -->
|
||||
|
||||
<div class="search">
|
||||
<%= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" %>
|
||||
</div>
|
||||
<!-- .login-top -->
|
||||
<nav>
|
||||
<%= link_to dashboard_path, :class => current_page?(root_path) ? "current dashboard" : "dashboard" do %>
|
||||
|
@ -26,23 +36,10 @@
|
|||
<span></span>Admin
|
||||
<% end %>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<!-- eo Page Header -->
|
||||
|
||||
<div id="header-panel" style="display:none">
|
||||
<div class="container">
|
||||
<div class="span-24">
|
||||
<div class="span-10">
|
||||
<span class="search-holder">
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<%= link_to truncate(@project.name, :length => 20), project_path(@project), :class => "current button" if @project && !@project.new_record? %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if current_user %>
|
||||
<%= javascript_tag do %>
|
||||
$(function() {
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body{ :class => content_for?(:body_class) ? yield(:body_class) : 'project-page', :id => yield(:boyd_id)}
|
||||
%body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
|
|
|
@ -2,22 +2,16 @@
|
|||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
-#= stylesheet_link_tag 'blueprint/screen', :media => "screen, projection"
|
||||
-#= stylesheet_link_tag 'blueprint/print', :media => "print"
|
||||
-#= stylesheet_link_tag 'blueprint/plugins/buttons/screen', :media => "screen, projection"
|
||||
-#= stylesheet_link_tag 'blueprint/plugins/link-icons/screen', :media => "screen, projection"
|
||||
GitLab
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body{ :class => yield(:body_class), :id => yield(:boyd_id)}
|
||||
%body{ :class => body_class, :id => yield(:boyd_id)}
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
%div{ :id => "main", :role => "main", :class => "container_4" }
|
||||
= render :partial => "layouts/page_title"
|
||||
= yield
|
||||
= render :partial => "layouts/page_title"
|
||||
= yield
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body{ :class => content_for?(:body_class) ? yield(:body_class) : 'project-page', :id => yield(:boyd_id)}
|
||||
%body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
|
|
|
@ -6,40 +6,39 @@
|
|||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
%link{:href => "/assets/favicon.png", :rel => "icon", :type => "image/png"}/
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body{ :class => content_for?(:body_class) ? yield(:body_class) : 'project-page', :id => yield(:boyd_id)}
|
||||
%body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
.project-container
|
||||
.project-sidebar
|
||||
.fixed
|
||||
%input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo}
|
||||
%aside
|
||||
= link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
|
||||
= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
|
||||
= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
|
||||
= link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
|
||||
Team
|
||||
- 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
|
||||
- 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
|
||||
%span{ :class => "number" }= @project.common_notes.count
|
||||
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
|
||||
Snippets
|
||||
- if @project.snippets.count > 0
|
||||
%span{ :class => "number" }= @project.snippets.non_expired.count
|
||||
- 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
|
||||
%input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
|
||||
%aside
|
||||
= link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
|
||||
= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
|
||||
= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
|
||||
= link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
|
||||
Team
|
||||
- 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
|
||||
- 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
|
||||
%span{ :class => "number" }= @project.common_notes.count
|
||||
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
|
||||
Snippets
|
||||
- if @project.snippets.count > 0
|
||||
%span{ :class => "number" }= @project.snippets.non_expired.count
|
||||
- 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
|
||||
|
||||
.project-content
|
||||
= yield
|
||||
|
|
17
app/views/notes/_load.js.haml
Normal file
17
app/views/notes/_load.js.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- unless @notes.blank?
|
||||
|
||||
- if params[:last_id] && params[:first_id]
|
||||
:plain
|
||||
NoteList.replace(#{@notes.last.id}, #{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
|
||||
- elsif params[:last_id]
|
||||
:plain
|
||||
NoteList.prepend(#{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
- elsif params[:first_id]
|
||||
:plain
|
||||
NoteList.append(#{@notes.last.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
- else
|
||||
:plain
|
|
@ -1,12 +1,8 @@
|
|||
- if controller.action_name == "wall"
|
||||
%ul#notes-list= render "notes/notes_list"
|
||||
|
||||
- else
|
||||
%ul#notes-list= render "notes/notes_list"
|
||||
%br
|
||||
%br
|
||||
- if can? current_user, :write_note, @project
|
||||
= render "notes/form"
|
||||
- if can? current_user, :write_note, @project
|
||||
= render "notes/form"
|
||||
.clear
|
||||
%hr
|
||||
%ul#notes-list= render "notes/notes_list"
|
||||
|
||||
:javascript
|
||||
$('.delete-note').live('ajax:success', function() {
|
||||
|
@ -20,8 +16,11 @@
|
|||
$("#submit_note").removeAttr("disabled");
|
||||
})
|
||||
|
||||
- if ["issues", "projects"].include?(controller.controller_name)
|
||||
:javascript
|
||||
$(function(){
|
||||
var int =self.setInterval("updatePage()", 20000);
|
||||
$(function(){
|
||||
$("#note_note").live("click", function(){
|
||||
$(this).css("height", "100px");
|
||||
$('.attach_holder').show();
|
||||
});
|
||||
|
||||
NoteList.init("wall", #{@notes.last.try(:id) || 0}, #{@notes.first.try(:id) || 0});
|
||||
});
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
%li{:id => dom_id(note)}
|
||||
%div.note_author
|
||||
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||
%div.note_content.left
|
||||
= markdown(note.note)
|
||||
- if note.attachment.url
|
||||
Attachment:
|
||||
= link_to note.attachment_identifier, note.attachment.url, :target => "_blank"
|
||||
%br
|
||||
%span.author= note.author.name
|
||||
%cite.ago
|
||||
%li{:id => dom_id(note), :class => "note"}
|
||||
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||
%div.note-author
|
||||
%strong= note.author_name
|
||||
%cite.cgray
|
||||
= time_ago_in_words(note.updated_at)
|
||||
ago
|
||||
%br
|
||||
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
|
||||
= link_to 'Remove', [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-note right negative"
|
||||
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
|
||||
= link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note right"
|
||||
|
||||
%div.note-title
|
||||
= markdown(note.note)
|
||||
- if note.attachment.url
|
||||
.right
|
||||
%span.file
|
||||
= link_to note.attachment_identifier, note.attachment.url, :target => "_blank"
|
||||
.clear
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- if @note.valid?
|
||||
:plain
|
||||
$("#new_note .errors").remove();
|
||||
updatePage();
|
||||
$('#note_note').val("");
|
||||
NoteList.prepend(#{@note.id}, "#{escape_javascript(render :partial => "notes/show", :locals => {:note => @note})}");
|
||||
- else
|
||||
:plain
|
||||
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
.left= f.label :code
|
||||
%cite.right http://yourserver/
|
||||
%td= f.text_field :code, :placeholder => "example"
|
||||
|
||||
%tr
|
||||
%td= f.label :tag_list
|
||||
%td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
|
||||
|
||||
.field
|
||||
= f.label :description
|
||||
%br/
|
||||
|
@ -41,8 +46,25 @@
|
|||
%h3.prepend-top Creating project & repository. Please wait for few minutes
|
||||
- else
|
||||
%h3.prepend-top Updating project & repository. Please wait for few minutes
|
||||
|
||||
:javascript
|
||||
$('.new_project, .edit_project').bind('ajax:before', function() {
|
||||
$(this).find(".form_content").hide();
|
||||
$('.ajax_loader').show();
|
||||
});
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
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;
|
||||
});
|
||||
})
|
||||
|
|
|
@ -10,7 +10,12 @@
|
|||
|
||||
- @projects.each do |project|
|
||||
%tr{ :class => "project", :url => project_path(project) }
|
||||
%td= project.name
|
||||
%td
|
||||
= project.name
|
||||
.small-tags
|
||||
- project.tag_list.each do |tag|
|
||||
= link_to tag, "/tags/#{tag}"
|
||||
|
||||
%td= truncate project.url_to_repo
|
||||
%td= project.code
|
||||
%td= check_box_tag "read", 1, project.readers.include?(current_user), :disabled => :disabled
|
||||
|
|
8
app/views/projects/_refs.html.haml
Normal file
8
app/views/projects/_refs.html.haml
Normal file
|
@ -0,0 +1,8 @@
|
|||
= form_tag destination, :method => :get, :class => "project-refs-form" do
|
||||
= select_tag "ref", grouped_options_refs, :onchange => "this.form.submit();", :class => "project-refs-select"
|
||||
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
$('.project-refs-select').chosen();
|
||||
})
|
|
@ -12,6 +12,11 @@
|
|||
%span Last Activity:
|
||||
- last_note = project.notes.last
|
||||
= last_note ? last_note.created_at.stamp("24 Aug, 2011") : "Never"
|
||||
|
||||
%p.small-tags
|
||||
- project.tag_list.each do |tag|
|
||||
= link_to tag, "/tags/#{tag}"
|
||||
|
||||
.buttons
|
||||
%a.browse-code.button.yellow{:href => tree_project_path(project)} Browse code
|
||||
%a.commits.button.green{:href => project_commits_path(project)} Commits
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
.left
|
||||
= form_tag tree_project_path(@project), :method => :get do
|
||||
= select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches"
|
||||
.left
|
||||
= form_tag tree_project_path(@project), :method => :get do
|
||||
= select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags"
|
||||
.clear
|
||||
|
||||
%br
|
||||
|
||||
-#%a.right.button{:href => "#"} Download
|
||||
-#-if can? current_user, :admin_project, @project
|
||||
|
@ -14,14 +5,9 @@
|
|||
#tree-breadcrumbs
|
||||
%h2.icon
|
||||
%span
|
||||
= link_to tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true, :class => 'project-name' do
|
||||
%i.arrow>
|
||||
= @project.name
|
||||
|
||||
%d
|
||||
%a{:href => "#"}
|
||||
= @ref
|
||||
|
||||
= link_to tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true do
|
||||
= @project.name
|
||||
- if params[:path]
|
||||
- part_path = ""
|
||||
- params[:path].split("\/").each do |part|
|
||||
|
@ -30,7 +16,8 @@
|
|||
- part_path = part
|
||||
\/
|
||||
= link_to truncate(part, :length => 40), tree_file_project_path(@project, :path => part_path, :commit_id => @commit.try(:id), :branch => @branch, :tag => @tag), :remote => :true
|
||||
|
||||
|
||||
.right= render :partial => "projects/refs", :locals => { :destination => tree_project_path(@project) }
|
||||
.clear
|
||||
|
||||
#tree-content-holder
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
- content_for(:body_class, "projects-page")
|
||||
- content_for(:page_title) do
|
||||
.grid_4
|
||||
- if current_user.can_create_project?
|
||||
%a.grey-button.right{:href => new_project_path} Create new project
|
||||
%h2.icon
|
||||
%span
|
||||
Projects
|
||||
.container_4
|
||||
.grid_4
|
||||
- if current_user.can_create_project?
|
||||
%a.grey-button.right{:href => new_project_path} Create new project
|
||||
%h2.icon
|
||||
%span
|
||||
Projects
|
||||
|
||||
- unless @projects.empty?
|
||||
%div{:class => "tile", :style => view_mode_style("tile")}
|
||||
= render "tile"
|
||||
%div{:class => "list", :style => view_mode_style("list")}
|
||||
= render "list"
|
||||
- else
|
||||
%center.prepend-top
|
||||
%h2
|
||||
%cite Nothing here
|
||||
%div.clear
|
||||
- unless @projects.empty?
|
||||
%div{:class => "tile", :style => view_mode_style("tile")}
|
||||
= render "tile"
|
||||
%div{:class => "list", :style => view_mode_style("list")}
|
||||
= render "list"
|
||||
- else
|
||||
%center.prepend-top
|
||||
%h2
|
||||
%cite Nothing here
|
||||
|
|
|
@ -1,29 +1,6 @@
|
|||
%div.wall_page
|
||||
- if can? current_user, :write_note, @project
|
||||
= render "notes/form"
|
||||
.right
|
||||
= form_tag wall_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"
|
||||
.span-2
|
||||
= radio_button_tag :view, "all", params[:view] == "all", :onclick => "this.form.submit()", :id => "all_view"
|
||||
= label_tag "all_view","All"
|
||||
.clear
|
||||
%br
|
||||
%hr
|
||||
= render "notes/notes"
|
||||
= render "notes/notes"
|
||||
|
||||
.loading{ :style => "display:none;"}
|
||||
%center= image_tag "ajax-loader.gif"
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
$("#note_note").live("click", function(){
|
||||
$(this).css("height", "100px");
|
||||
$('.attach_holder').show();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
:plain
|
||||
$("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
= render "notes/load"
|
||||
|
|
11
app/views/tags/index.html.haml
Normal file
11
app/views/tags/index.html.haml
Normal file
|
@ -0,0 +1,11 @@
|
|||
- content_for(:body_class, "projects-page")
|
||||
- content_for(:page_title) do
|
||||
.grid_4
|
||||
%h2
|
||||
Tags
|
||||
|
||||
|
||||
.tags-list
|
||||
- @tags.all.each do |tag|
|
||||
= link_to "#{tag.name}(#{tag.count})", "/tags/#{tag.name}"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue