Merge branch 'dev' into issue-184
This commit is contained in:
commit
6323cdda68
27 changed files with 195 additions and 154 deletions
|
@ -12,7 +12,7 @@
|
|||
\/
|
||||
%a{:href => "#"}= params[:path].split("/").join(" / ")
|
||||
|
||||
.right= render "projects/refs"
|
||||
.right= render :partial => "projects/refs", :locals => { :destination => project_commits_path(@project) }
|
||||
|
||||
%div{:id => dom_id(@project)}
|
||||
= render "commits"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
%h2
|
||||
= "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:
|
||||
|
@ -54,4 +52,3 @@
|
|||
= 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() {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= 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"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
= 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"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= 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"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= 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"
|
||||
|
|
10
app/views/notes/_load.js.haml
Normal file
10
app/views/notes/_load.js.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
- unless @notes.blank?
|
||||
|
||||
- if params[:last_id]
|
||||
:plain
|
||||
NoteList.prepend(#{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
||||
- if params[:first_id]
|
||||
:plain
|
||||
NoteList.append(#{@notes.last.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}");
|
||||
|
|
@ -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
|
||||
%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
|
||||
= time_ago_in_words(note.updated_at)
|
||||
ago
|
||||
- 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"
|
||||
|
||||
%div.note-title
|
||||
= 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
|
||||
= 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"
|
||||
.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'))}");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= form_tag project_commits_path(@project), :method => :get, :class => "project-refs-form" do
|
||||
= form_tag destination, :method => :get, :class => "project-refs-form" do
|
||||
= select_tag "ref", grouped_options_refs, :onchange => "this.form.submit();", :class => "project-refs-select"
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
\/
|
||||
= 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 "projects/refs"
|
||||
.right= render :partial => "projects/refs", :locals => { :destination => tree_project_path(@project) }
|
||||
.clear
|
||||
|
||||
#tree-content-holder
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue