Merge branch 'dev'
Conflicts: app/assets/images/ajax-loader.gif public/favicon.ico
This commit is contained in:
commit
b8ca1d62c4
195 changed files with 6402 additions and 1158 deletions
|
@ -1,29 +1,28 @@
|
|||
%p This is page with preview for all system emails that are sent to user
|
||||
%p Email previews built based on existing Project/Commit/Issue base - so some preview maybe unavailable unless object appear in system
|
||||
%p Email previews built based on existing Project/Commit/Issue base - so some preview maybe unavailable unless object appear in system
|
||||
|
||||
#accordion
|
||||
%h3
|
||||
%a New user
|
||||
%div
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_user_new_path, :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%a New issue
|
||||
%div
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_issue_new_path, :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%h3
|
||||
%a Commit note
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_note_path(:type => "Commit"), :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%a Issue note
|
||||
%div
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_note_path(:type => "Issue"), :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%a Wall note
|
||||
%div
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_note_path(:type => "Wall"), :width=>"100%", :height=>"350"}
|
||||
|
||||
|
||||
:javascript
|
||||
:javascript
|
||||
$(function() {
|
||||
$( "#accordion" ).accordion(); });
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%table
|
||||
%tr
|
||||
%thead
|
||||
%th Name
|
||||
%th Code
|
||||
%th Path
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%p#notice= notice
|
||||
|
||||
.span-8.colborder
|
||||
%h2= @admin_project.name
|
||||
%h2= @admin_project.name
|
||||
|
||||
%p
|
||||
%b Name:
|
||||
|
@ -22,16 +22,16 @@
|
|||
|
||||
.span-14
|
||||
|
||||
%h2 Team
|
||||
%h2 Team
|
||||
|
||||
%table.round-borders
|
||||
%tr
|
||||
%th Name
|
||||
%th Added
|
||||
%th Added
|
||||
%th Web
|
||||
%th Git
|
||||
%th Admin
|
||||
%th
|
||||
%th
|
||||
|
||||
- @admin_project.users_projects.each do |tm|
|
||||
%tr
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
- @admin_team_members.group_by(&:project).sort.each do |project, members|
|
||||
%h3= link_to project.name, [:admin, project]
|
||||
%table
|
||||
%tr
|
||||
%thead
|
||||
%th Name
|
||||
%th Email
|
||||
%th Read
|
||||
%th Git
|
||||
%th Manage
|
||||
%th Added
|
||||
%th
|
||||
%th Added
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
- members.each do |tm|
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
%b Since:
|
||||
= @admin_team_member.updated_at
|
||||
|
||||
|
||||
.span-10
|
||||
.span-6
|
||||
%b Access:
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
.field
|
||||
= f.label :twitter
|
||||
%br
|
||||
= f.text_field :twitter
|
||||
= f.text_field :twitter
|
||||
.clear
|
||||
%br
|
||||
.actions
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%table
|
||||
%tr
|
||||
%thead
|
||||
%th Admin
|
||||
%th Name
|
||||
%th Email
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
|
||||
= render 'form'
|
||||
|
||||
|
||||
= link_to 'Back', admin_users_path, :class => "right lbutton"
|
||||
|
|
|
@ -19,28 +19,27 @@
|
|||
= @admin_user.skype
|
||||
%p
|
||||
%b LinkedIn:
|
||||
= @admin_user.linkedin
|
||||
= @admin_user.linkedin
|
||||
%p
|
||||
%b Twitter:
|
||||
= @admin_user.twitter
|
||||
|
||||
|
||||
.clear
|
||||
= link_to 'Edit', edit_admin_user_path(@admin_user)
|
||||
\|
|
||||
= link_to 'Back', admin_users_path
|
||||
|
||||
.span-14
|
||||
%h2 Projects
|
||||
%h2 Projects
|
||||
|
||||
%table.round-borders
|
||||
%tr
|
||||
%th Name
|
||||
%th Added
|
||||
%th Added
|
||||
%th Web
|
||||
%th Git
|
||||
%th Admin
|
||||
%th
|
||||
%th
|
||||
|
||||
- @admin_user.users_projects.each do |tm|
|
||||
- project = tm.project
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
- @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits|
|
||||
.day-commits-table
|
||||
.day-header
|
||||
%div{ :class => "commits-date ui-box ui-box-small ui-box-big" }
|
||||
.day-commits-table
|
||||
%h3= day.stamp("28 Aug, 2010")
|
||||
%ul
|
||||
- commits.each do |commit|
|
||||
%li{ :class => "commit", :url => project_commit_path(@project, :id => commit.id) }
|
||||
- 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;"
|
||||
%p
|
||||
%strong
|
||||
= truncate(commit.safe_message, :length => 60)
|
||||
= link_to "Browse Code", tree_project_path(@project, :commit_id => commit.id), :class => "lite_button", :style => "float:right"
|
||||
= link_to truncate(commit.id.to_s, :length => 16), project_commit_path(@project, :id => commit.id), :class => "lite_button", :style => "width:120px;float:right"
|
||||
%span
|
||||
%span.author
|
||||
= commit.author
|
||||
= time_ago_in_words(commit.committed_date)
|
||||
ago
|
||||
= more_commits_link if @commits.size > 99
|
||||
.data
|
||||
- commits.each do |commit|
|
||||
%a{ :class => "commit", :href => project_commit_path(@project, :id => commit.id) }
|
||||
%span.commit-info
|
||||
%data.commit-button
|
||||
= truncate(commit.id.to_s, :length => 16)
|
||||
%i
|
||||
%data.commit-browse{ :onclick => "location.href='#{tree_project_path(@project, :commit_id => commit.id)}';return false;"}
|
||||
Browse Code
|
||||
- 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;"
|
||||
%span.commit-title
|
||||
%strong
|
||||
= truncate(commit.safe_message, :length => 60)
|
||||
%span.commit-author
|
||||
%strong= commit.author_name
|
||||
= time_ago_in_words(commit.committed_date)
|
||||
ago
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
.diff_file_header
|
||||
- if diff.deleted_file
|
||||
%strong{:id => "#{diff.b_path}"}= diff.a_path
|
||||
- else
|
||||
- else
|
||||
= link_to tree_file_project_path(@project, @commit.id, diff.b_path) do
|
||||
%strong{:id => "#{diff.b_path}"}= diff.b_path
|
||||
%br/
|
||||
|
@ -19,5 +19,5 @@
|
|||
.diff_file_content_image
|
||||
%img{:src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
|
||||
- else
|
||||
%p
|
||||
%p
|
||||
%center No preview for this file type
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
%h1 Listing commits
|
||||
%div{:id => dom_id(@project)}
|
||||
= render "commits"
|
||||
%br/
|
||||
%br/
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
- line_new = 0
|
||||
- lines_arr = diff.diff.lines.to_a
|
||||
- lines_arr.each do |line|
|
||||
- next if line.match(/^--- \/dev\/null/)
|
||||
- next if line.match(/^--- a/)
|
||||
- next if line.match(/^\+\+\+ b/)
|
||||
- if line.match(/^@@ -/)
|
||||
|
@ -12,10 +13,10 @@
|
|||
= diff_line(line, line_new, line_old)
|
||||
- if line[0] == "+"
|
||||
- line_new += 1
|
||||
- elsif
|
||||
- elsif
|
||||
- line[0] == "-"
|
||||
- line_old += 1
|
||||
- else
|
||||
- else
|
||||
- line_new += 1
|
||||
- line_old += 1
|
||||
|
||||
|
|
|
@ -1,15 +1,28 @@
|
|||
%div
|
||||
%h3
|
||||
.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.prepend-1
|
||||
= 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"
|
||||
= text_field_tag "ssh", @project.url_to_repo, :class => ["ssh_project_url", "one_click_select"]
|
||||
.clear
|
||||
- if params[:path]
|
||||
%h3{:style => "color:#555"} /#{params[:path]}
|
||||
%div{:id => dom_id(@project)}
|
||||
= render "commits"
|
||||
- content_for(:body_class, "project-page commits-page")
|
||||
|
||||
-#%a.right.button{:href => "#"} Download
|
||||
-#-if can? current_user, :admin_project, @project
|
||||
%a.right.button.blue{:href => "#"} EDIT
|
||||
%h2.icon
|
||||
%span
|
||||
%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)}
|
||||
#commits_list= render "commits"
|
||||
.clear
|
||||
.loading{ :style => "display:none;"}
|
||||
%center= image_tag "ajax-loader.gif"
|
||||
|
||||
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
CommitsList.init("#{@ref}", 20);
|
||||
});
|
||||
|
|
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
|
||||
|
@ -7,33 +7,21 @@
|
|||
%td= @commit.id
|
||||
%tr
|
||||
%td Author
|
||||
%td= @commit.author
|
||||
%tr
|
||||
%td Commiter
|
||||
%td= @commit.committer
|
||||
%td= @commit.author_name
|
||||
%tr
|
||||
%td Commited Date
|
||||
%td= @commit.committed_date
|
||||
%td= @commit.committed_date.stamp("21 Aug 2011, 11:15pm")
|
||||
%tr
|
||||
%td Message
|
||||
%td= @commit.safe_message
|
||||
%td
|
||||
%pre.commit_message
|
||||
= preserve @commit.safe_message
|
||||
%tr
|
||||
%td Tree
|
||||
%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"
|
||||
|
|
|
@ -1 +1,40 @@
|
|||
timeline
|
||||
- content_for(:body_class, "dashboard-page")
|
||||
|
||||
#dashboard-content.dashboard-content.content
|
||||
%aside
|
||||
%h4
|
||||
- if current_user.can_create_project?
|
||||
%a.button-small.button-green{:href => new_project_path} New Repository
|
||||
Your Repositories
|
||||
%ol.project-list
|
||||
- @projects.each do |project|
|
||||
%li
|
||||
%a{:href => project_path(project)}
|
||||
%span.arrow →
|
||||
%span.project-name= project.name
|
||||
%span.time
|
||||
%strong Last activity:
|
||||
= project.last_activity_date ? time_ago_in_words(project.last_activity_date) + " ago" : "Never"
|
||||
#news-feed.news-feed
|
||||
%h2.icon
|
||||
%span>
|
||||
Dashboard
|
||||
- @active_projects.first(3).each do |project|
|
||||
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
|
||||
%h3= project.name
|
||||
.data
|
||||
- project.updates.each do |update|
|
||||
%a.project-update{:href => dashboard_feed_path(project, update)}
|
||||
= image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
|
||||
%span.update-title
|
||||
= dashboard_feed_title(update)
|
||||
%span.update-author
|
||||
%strong= update.author_name
|
||||
authored
|
||||
= time_ago_in_words(update.created_at)
|
||||
ago
|
||||
%br
|
||||
/ .project-update
|
||||
/ .project-updates
|
||||
/ #news-feed
|
||||
/ #dashboard-content
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
<div><%= f.submit "Change my password" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
<h2>Forgot your password?</h2>
|
||||
|
||||
<div class="span-12 colborder">
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.submit "Send me reset password instructions", :class => "lbutton vm" %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
</div>
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :class => "login-box", :method => :post }) do |f| %>
|
||||
<%= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= f.email_field :email, :placeholder => "Email", :class => "text top" %>
|
||||
<br/>
|
||||
<%= f.submit "Reset password", :class => "grey-button" %>
|
||||
<div class="right"> <%= render :partial => "devise/shared/links" %></div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
<h2>Sign in</h2>
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login-box" }) do |f| %>
|
||||
<%= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" %>
|
||||
<%= f.text_field :email, :class => "text top", :placeholder => "Email" %>
|
||||
<%= f.password_field :password, :class => "text bottom", :placeholder => "Password" %>
|
||||
|
||||
<div class="span-12 colborder">
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.text_field :email %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
<br/>
|
||||
<div><%= f.submit "Sign in", :class => "lbutton vm" %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div>
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
</div>
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
<br/>
|
||||
<%= f.submit "Sign in", :class => "grey-button" %>
|
||||
<div class="right"> <%= render :partial => "devise/shared/links" %></div>
|
||||
<% end %>
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
<div><%= f.submit "Resend unlock instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
.span-8
|
||||
= f.label :title
|
||||
= f.text_field :title, :style => "width:450px"
|
||||
.span-8
|
||||
= f.label :content
|
||||
= f.text_area :content, :style => "width:450px; height:130px"
|
||||
= 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
|
||||
= f.label :assignee_id
|
||||
= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
%table.round-borders#issues-table
|
||||
%tr
|
||||
%thead
|
||||
- if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0"
|
||||
%th
|
||||
%th
|
||||
%th Assignee
|
||||
%th ID
|
||||
%th Title
|
||||
%th Closed?
|
||||
%th
|
||||
|
||||
- @issues.critical.each do |issue|
|
||||
= render(:partial => 'show', :locals => {:issue => issue})
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
%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"
|
||||
- if can?(current_user, :admin_issue, @project) && (!params[:f] || params[:f] == "0")
|
||||
%td
|
||||
= 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
|
||||
= html_escape issue.title
|
||||
= 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
|
||||
|
@ -21,13 +30,8 @@
|
|||
-#notes
|
||||
%td
|
||||
- if can? current_user, :write_issue, @project
|
||||
= form_for([@project, issue], :remote => true) do |f|
|
||||
= form_for([@project, issue], :remote => true) do |f|
|
||||
= f.check_box :closed, :onclick => "$(this).parent().submit();"
|
||||
= hidden_field_tag :status_only, true
|
||||
- else
|
||||
- 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}"
|
||||
|
|
|
@ -1,28 +1,52 @@
|
|||
%div
|
||||
- if can? current_user, :write_issue, @project
|
||||
.left= link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm"
|
||||
.right
|
||||
= form_tag project_issues_path(@project), :method => :get do
|
||||
.span-2
|
||||
= radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues"
|
||||
= label_tag "open_issues","Open"
|
||||
.span-2
|
||||
= radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues"
|
||||
= label_tag "closed_issues","Closed"
|
||||
.span-2
|
||||
= radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues"
|
||||
= label_tag "my_issues","To Me"
|
||||
|
||||
.span-2
|
||||
= radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues"
|
||||
= label_tag "all_issues","All"
|
||||
.top_panel_issues
|
||||
- if can? current_user, :write_issue, @project
|
||||
%div{:class => "left", :style => "margin-right: 10px;" }
|
||||
= 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
|
||||
= form_tag project_issues_path(@project), :method => :get do
|
||||
.left
|
||||
= radio_button_tag :f, 0, (params[:f] || "0") == "0", :onclick => "this.form.submit()", :id => "open_issues", :class => "status"
|
||||
= label_tag "open_issues","Open"
|
||||
.left
|
||||
= radio_button_tag :f, 2, params[:f] == "2", :onclick => "this.form.submit()", :id => "closed_issues", :class => "status"
|
||||
= label_tag "closed_issues","Closed"
|
||||
.left
|
||||
= radio_button_tag :f, 3, params[:f] == "3", :onclick => "this.form.submit()", :id => "my_issues", :class => "status"
|
||||
= label_tag "my_issues","To Me"
|
||||
.left
|
||||
= radio_button_tag :f, 1, params[:f] == "1", :onclick => "this.form.submit()", :id => "all_issues", :class => "status"
|
||||
= label_tag "all_issues","All"
|
||||
|
||||
#issues-table-holder= render "issues"
|
||||
%br
|
||||
:javascript
|
||||
$('.delete-issue').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
|
||||
var href = $('.issue_search').parent().attr('action');
|
||||
var last_terms = '';
|
||||
|
||||
$('.issue_search').keyup(function() {
|
||||
var terms = $(this).val();
|
||||
var project_id = $('#project_id').val();
|
||||
var status = $('.status:checked').val();
|
||||
if (terms != last_terms) {
|
||||
last_terms = terms;
|
||||
|
||||
if (terms.length >= 2 || terms.length == 0) {
|
||||
$.get(href, { 'status': status, 'terms': terms, project: project_id }, function(response) {
|
||||
$('#issues-table').html(response);
|
||||
setSortable();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.delete-issue').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); updatePage();});
|
||||
|
||||
function setSortable(){
|
||||
$('#issues-table>tbody').sortable({
|
||||
axis: 'y',
|
||||
|
|
|
@ -1,44 +1,51 @@
|
|||
%h2
|
||||
= "Issue ##{@issue.id} - #{@issue.title}"
|
||||
|
||||
.span-15
|
||||
= simple_format html_escape(@issue.content)
|
||||
%strong
|
||||
Issue
|
||||
= "##{@issue.id}"
|
||||
–
|
||||
= html_escape(@issue.title)
|
||||
.left.width-65p
|
||||
.issue_notes= render "notes/notes"
|
||||
.span-8.right
|
||||
|
||||
.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 Author:
|
||||
%td
|
||||
= image_tag gravatar_icon(@issue.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
||||
= @issue.author.name
|
||||
%tr
|
||||
%td Assignee:
|
||||
%td Assignee:
|
||||
%td
|
||||
= image_tag gravatar_icon(@issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
||||
= @issue.assignee.name
|
||||
%tr
|
||||
%td Tags
|
||||
%td
|
||||
- if @issue.critical
|
||||
%span.tag.high critical
|
||||
- else
|
||||
%span.tag.normal normal
|
||||
|
||||
- if @issue.today?
|
||||
%span.tag.today today
|
||||
%tr
|
||||
%td Closed?
|
||||
%td
|
||||
- if can? current_user, :write_issue, @project
|
||||
= form_for([@project, @issue]) do |f|
|
||||
- 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
|
||||
- else
|
||||
- else
|
||||
= check_box_tag "closed", 1, @issue.closed, :disabled => true
|
||||
|
||||
|
||||
- if can?(current_user, :write_issue, @issue)
|
||||
.clear
|
||||
%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"
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
- if @issue.valid?
|
||||
:plain
|
||||
$("##{dom_id(@issue)}").fadeOut();
|
||||
- else
|
||||
- else
|
||||
- if @issue.valid?
|
||||
:plain
|
||||
$("#edit_issue_dialog").dialog("close");
|
||||
$.ajax({type: "GET", url: location.href, dataType: "script"});
|
||||
updatePage();
|
||||
- else
|
||||
:plain
|
||||
$("#edit_issue_dialog").empty();
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
= render(:partial => 'show', :locals => {:key => key})
|
||||
|
||||
:javascript
|
||||
$('.delete-key').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
$('.delete-key').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
%h4= text
|
||||
:javascript
|
||||
$(function(){
|
||||
$("#flash_container").slideDown("slow");
|
||||
$("#flash_container").click(function(){
|
||||
$(this).slideUp("slow");
|
||||
$("#flash_container").slideDown("slow");
|
||||
$("#flash_container").click(function(){
|
||||
$(this).slideUp("slow");
|
||||
});
|
||||
setTimeout("hideFlash()",2000);
|
||||
});
|
||||
|
|
|
@ -1,27 +1,44 @@
|
|||
<div id="header-panel">
|
||||
<div class="container">
|
||||
<div class="span-24">
|
||||
<div class="span-10">
|
||||
<%#= image_tag "git.png", :height => 40, :class => "left" %>
|
||||
<%#= link_to "gitlab", root_path, :id => "logo" %>
|
||||
<span class="search-holder">
|
||||
<%= text_field_tag "search", nil, :placeholder => "Search" %>
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<%= link_to truncate(@project.name, :length => 20), project_path(@project), :class => "current button" if @project && !@project.new_record? %>
|
||||
<%= link_to 'Projects', projects_path, :class => current_page?(projects_path) ? "current button" : "button" %>
|
||||
<%= link_to('Admin', admin_root_path, :class => admin_namespace? ? "current button" : "button" ) if current_user.is_admin? %>
|
||||
<%= link_to profile_path, :class => ((controller.controller_name == "keys" || controller.controller_name == "profile") ? "current button" : "button") do %>
|
||||
<%= image_tag gravatar_icon(current_user.email) %>
|
||||
<%= current_user.name.split(" ").first %>
|
||||
<% end %>
|
||||
<%= link_to 'Logout', destroy_user_session_path, :style => "border-left: 1px solid #666;", :class => "button", :method => :delete %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Page Header -->
|
||||
<header>
|
||||
<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><!-- .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 %>
|
||||
<span></span>Dashboard
|
||||
<% end %>
|
||||
<%= link_to projects_path, :class => current_page?(projects_path) ? "current project" : "project" do %>
|
||||
<span></span>Projects
|
||||
<% end %>
|
||||
<%= link_to((current_user.is_admin? ? admin_root_path : "#"), :class => (admin_namespace? ? "current admin" : "admin")) do %>
|
||||
<span></span>Admin
|
||||
<% end %>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<!-- eo Page Header -->
|
||||
|
||||
<% if current_user %>
|
||||
<%= javascript_tag do %>
|
||||
|
|
2
app/views/layouts/_page_title.html.haml
Normal file
2
app/views/layouts/_page_title.html.haml
Normal file
|
@ -0,0 +1,2 @@
|
|||
- if content_for?(:page_title)
|
||||
= yield :page_title
|
26
app/views/layouts/admin.html.haml
Normal file
26
app/views/layouts/admin.html.haml
Normal file
|
@ -0,0 +1,26 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%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
|
||||
%aside
|
||||
= link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil
|
||||
= link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil
|
||||
= link_to "Teams", admin_team_members_path, :class => controller.controller_name == "team_members" ? "current" : nil
|
||||
= link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil
|
||||
|
||||
.project-content
|
||||
= yield
|
|
@ -2,28 +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"
|
||||
= stylesheet_link_tag 'jquery_ui/jquery-ui-1.8.16.custom', :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#thebody
|
||||
= render :partial => "layouts/flash"
|
||||
- if user_signed_in?
|
||||
%body{ :class => body_class, :id => yield(:boyd_id)}
|
||||
#container
|
||||
= render :partial => "layouts/flash"
|
||||
= render :partial => "layouts/head_panel"
|
||||
.top_bar.container
|
||||
= render :partial => "projects/top_menu" if @project && !@project.new_record?
|
||||
= render :partial => "projects/projects_top_menu" if (controller.controller_name == "projects" && ["index", "new", "create"].include?(controller.action_name)) && !admin_namespace?
|
||||
= render :partial => "profile/top_menu" if ["keys", "profile"].include?(controller.controller_name)
|
||||
= render :partial => "admin/top_menu" if admin_namespace?
|
||||
#content-container.container
|
||||
.span-24
|
||||
= yield
|
||||
= render :partial => "layouts/page_title"
|
||||
= yield
|
||||
|
|
14
app/views/layouts/devise.html.haml
Normal file
14
app/views/layouts/devise.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%body.login-page
|
||||
= render :partial => "layouts/flash"
|
||||
= yield
|
28
app/views/layouts/profile.html.haml
Normal file
28
app/views/layouts/profile.html.haml
Normal file
|
@ -0,0 +1,28 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%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
|
||||
%aside
|
||||
= link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil
|
||||
= link_to "Password", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
|
||||
= link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
|
||||
Keys
|
||||
- unless current_user.keys.empty?
|
||||
%span{ :class => "number" }= current_user.keys.count
|
||||
|
||||
.project-content
|
||||
= yield
|
44
app/views/layouts/project.html.haml
Normal file
44
app/views/layouts/project.html.haml
Normal file
|
@ -0,0 +1,44 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%title
|
||||
GitLab #{" - #{@project.name}" if @project && !@project.new_record?}
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= javascript_tag do
|
||||
REQ_URI = "#{request.env["REQUEST_URI"]}";
|
||||
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
|
||||
%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
|
||||
|
||||
.project-content
|
||||
= yield
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
%div
|
||||
= f.label :note
|
||||
%cite (255 symbols only)
|
||||
%cite
|
||||
%br
|
||||
= f.text_area :note, :size => 255
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
= check_box_tag :notify, 1, true
|
||||
= label_tag :notify, "Notify project team about your note"
|
||||
|
||||
|
||||
.clear
|
||||
%br
|
||||
= f.submit 'Add note', :class => "lbutton vm", :id => "submit_note"
|
||||
|
|
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,28 +1,26 @@
|
|||
- 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() {
|
||||
$(this).closest('li').fadeOut(); });
|
||||
$('.delete-note').live('ajax:success', function() {
|
||||
$(this).closest('li').fadeOut(); });
|
||||
|
||||
$("#new_note").live("ajax:before", function(){
|
||||
$("#submit_note").attr("disabled", "disabled");
|
||||
$("#submit_note").attr("disabled", "disabled");
|
||||
})
|
||||
|
||||
$("#new_note").live("ajax:complete", function(){
|
||||
$("#submit_note").removeAttr("disabled");
|
||||
$("#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
|
||||
= simple_format(html_escape(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,11 +1,11 @@
|
|||
- 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'))}");
|
||||
|
||||
:plain
|
||||
:plain
|
||||
$("#submit_note").removeAttr("disabled");
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
%td{:align => "left", :style => "padding: 20px 0 0;"}
|
||||
%h2{:style => "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
|
||||
= link_to project_issue_url(@project, @issue) do
|
||||
= link_to project_issue_url(@project, @issue) do
|
||||
= "Issue ##{@issue.id.to_s}"
|
||||
= truncate(@issue.title, :length => 45)
|
||||
= truncate(@issue.title, :length => 45)
|
||||
%br
|
||||
%cite{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
|
||||
= @issue.content
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
%td{:align => "left", :style => "padding: 20px 0 0;"}
|
||||
%h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
|
||||
Hi #{@user.name}!
|
||||
Hi #{@user.name}!
|
||||
%p{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
|
||||
Administrator created account for you. Now you are a member of company gitlab application.
|
||||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
%td{:align => "left", :style => "padding: 20px 0 0;"}
|
||||
%h2{:style => "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
|
||||
New comment -
|
||||
= link_to project_issue_url(@project, @issue, :anchor => "note_#{@note.id}") do
|
||||
New comment -
|
||||
= link_to project_issue_url(@project, @issue, :anchor => "note_#{@note.id}") do
|
||||
= "Issue ##{@issue.id.to_s}"
|
||||
= truncate(@issue.title, :length => 35)
|
||||
= truncate(@issue.title, :length => 35)
|
||||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
%tr
|
||||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
%td{:align => "left", :style => "padding: 20px 0 0;"}
|
||||
%h2{:style => "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
|
||||
New message on
|
||||
New message on
|
||||
= link_to "Project Wall", wall_project_url(@project, :anchor => "note_#{@note.id}")
|
||||
%td{:style => "font-size: 1px; line-height: 1px;", :width => "21"}
|
||||
%tr
|
||||
|
|
|
@ -21,10 +21,15 @@
|
|||
%td
|
||||
= f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
.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/
|
||||
|
@ -39,10 +44,27 @@
|
|||
= image_tag "ajax-loader.gif", :class => "append-bottom"
|
||||
- if @project.new_record?
|
||||
%h3.prepend-top Creating project & repository. Please wait for few minutes
|
||||
- else
|
||||
- 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();
|
||||
$('.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,13 +10,18 @@
|
|||
|
||||
- @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
|
||||
%td= check_box_tag "commit", 1, project.writers.include?(current_user), :disabled => :disabled
|
||||
%td= check_box_tag "admin", 1, project.admins.include?(current_user), :disabled => :disabled
|
||||
%td
|
||||
%td
|
||||
-if can? current_user, :admin_project, project
|
||||
= link_to 'Edit', edit_project_path(project), :class => "lbutton positive"
|
||||
%br
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
$(".list").toggle();
|
||||
if($(".tile").is(":visible")){
|
||||
$.cookie('project_view', 'tile', { expires: 14 });
|
||||
} else {
|
||||
} else {
|
||||
$.cookie('project_view', 'list', { expires: 14 });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
= image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||
%p{:style => "margin-bottom: 3px;"}
|
||||
%strong
|
||||
= link_to truncate(commit.safe_message, :length => 60), project_commit_path(@project, :id => commit.id)
|
||||
|
||||
= link_to truncate(commit.safe_message, :length => 60), project_commit_path(@project, :id => commit.id)
|
||||
|
||||
%span
|
||||
%span.author
|
||||
= commit.author.name.force_encoding("UTF-8")
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
%p{:style => "margin-bottom: 3px;"}
|
||||
%span.author
|
||||
= note.author.name
|
||||
= link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}"
|
||||
= link_to markdown(truncate(note.note, :length => 200)), link_to_item + "#note_#{note.id}"
|
||||
- if note.attachment.url
|
||||
%br
|
||||
Attachment:
|
||||
|
|
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();
|
||||
})
|
|
@ -2,7 +2,7 @@
|
|||
%div#new-member-holder
|
||||
= link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "lbutton vm"
|
||||
%table.round-borders#team-table
|
||||
%tr
|
||||
%thead
|
||||
%th Name
|
||||
%th Email
|
||||
%th Web
|
||||
|
@ -14,5 +14,5 @@
|
|||
= render(:partial => 'team_members/show', :locals => {:member => up})
|
||||
|
||||
:javascript
|
||||
$('.delete-team-member').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
$('.delete-team-member').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
- @projects.in_groups_of(3, false) do |projects|
|
||||
- projects.each_with_index do |project, i|
|
||||
%div{ :class => "project_thumb round-borders", :style => i == 2 ? "" : "margin-right:30px;" }
|
||||
%div{ :class => "project", :url => project_path(project) }
|
||||
%h2
|
||||
= image_tag gravatar_icon(project.name), :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||
= link_to ("/" + project.code), project_path(project), :style => "text-decoration:none"
|
||||
%p= project.name
|
||||
%p= project.url_to_repo
|
||||
-#%p
|
||||
Commit –
|
||||
= last_commit(project)
|
||||
%hr
|
||||
= link_to "Browse Code", tree_project_path(project), :class => "lbutton"
|
||||
= link_to "Commits", project_commits_path(project), :class => "lbutton", :style => "float:right;width:80px;"
|
||||
.clear
|
||||
%div.grid_1
|
||||
%div{ :class => "project-box ui-box ui-box-big" }
|
||||
= link_to project_path(project) do
|
||||
%h3= project.name
|
||||
.data
|
||||
%p.title.repository
|
||||
%span Repository:
|
||||
= project.url_to_repo
|
||||
%p.title.activity
|
||||
%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,5 +1,4 @@
|
|||
%div.top_project_menu
|
||||
-#%span= link_to @project.code.capitalize, @project, :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
|
||||
- if @project.repo_exists?
|
||||
%span= link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
|
||||
%span= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
|
||||
|
@ -23,7 +22,7 @@
|
|||
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
|
||||
Snippets
|
||||
- if @project.snippets.count > 0
|
||||
%span{ :class => "top_menu_count" }= @project.snippets.count
|
||||
%span{ :class => "top_menu_count" }= @project.snippets.non_expired.count
|
||||
|
||||
- if @commit
|
||||
%span= 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
|
||||
|
|
|
@ -1,31 +1,32 @@
|
|||
%h3
|
||||
.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.prepend-1
|
||||
= 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"
|
||||
= text_field_tag "ssh", @project.url_to_repo, :class => ["ssh_project_url","one_click_select"]
|
||||
.clear
|
||||
|
||||
%h3#tree-breadcrumbs
|
||||
= link_to @project.name, tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true
|
||||
- if params[:path]
|
||||
- part_path = ""
|
||||
- params[:path].split("\/").each do |part|
|
||||
- part_path = File.join(part_path, part) unless part_path.empty?
|
||||
- if part_path.empty?
|
||||
- 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
|
||||
-#%a.right.button{:href => "#"} Download
|
||||
-#-if can? current_user, :admin_project, @project
|
||||
%a.right.button.blue{:href => "#"} EDIT
|
||||
#tree-breadcrumbs
|
||||
%h2.icon
|
||||
%span
|
||||
%d
|
||||
= 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|
|
||||
- part_path = File.join(part_path, part) unless part_path.empty?
|
||||
- if part_path.empty?
|
||||
- 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
|
||||
- if tree.is_a?(Grit::Blob)
|
||||
= render :partial => "projects/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree }
|
||||
- else
|
||||
- contents = tree.contents
|
||||
%table#tree-slider.round-borders
|
||||
%tr
|
||||
%thead
|
||||
%th Name
|
||||
%th Last Update
|
||||
%th
|
||||
|
|
|
@ -40,7 +40,7 @@ eos
|
|||
<p>
|
||||
Be careful! <br/>
|
||||
Project cant be recovered after destroy.</p>
|
||||
<%= link_to 'Destroy', @project,
|
||||
<%= link_to 'Destroy', @project,
|
||||
:confirm => 'Are you sure?', :method => :delete,
|
||||
:class => "left button negative span-6", :style => "text-align:center" %>
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
- 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
|
||||
- content_for(:body_class, "projects-page")
|
||||
- content_for(:page_title) do
|
||||
.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
|
||||
|
||||
%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
|
||||
|
|
|
@ -13,11 +13,16 @@
|
|||
= label_tag "week_view","Week"
|
||||
.clear
|
||||
%hr
|
||||
.span-11
|
||||
.left.width-49p
|
||||
%h3 Commits
|
||||
=render "projects/recent_commits"
|
||||
|
||||
.span-11.right
|
||||
.right.width-49p
|
||||
%h3 Talk
|
||||
=render "projects/recent_messages"
|
||||
|
||||
:javascript
|
||||
function updateDashboard(){
|
||||
$('#content-container').load("#{escape_javascript(project_path(@project))} #content-container>*");
|
||||
}
|
||||
setInterval("updateDashboard()", 300000);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
:plain
|
||||
$("#tree-holder table").hide("slide", { direction: "left" }, 150, function(){
|
||||
$("#tree-holder table").hide("slide", { direction: "left" }, 150, function(){
|
||||
$("#tree-holder").html("#{escape_javascript(render(:partial => "tree", :locals => {:repo => @repo, :commit => @commit, :tree => @tree}))}");
|
||||
$("#tree-holder table").show("slide", { direction: "right" }, 150);
|
||||
});
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,11 +12,14 @@
|
|||
%tr
|
||||
%td= f.label :file_name
|
||||
%td= f.text_field :file_name, :placeholder => "example.rb"
|
||||
%tr
|
||||
%td= f.label "Lifetime"
|
||||
%td= f.select :expires_at, lifetime_select_options
|
||||
%tr
|
||||
%td{:colspan => 2}
|
||||
= f.label :content, "Code"
|
||||
%br
|
||||
= f.text_area :content, :style => "height:240px;width:932px;"
|
||||
|
||||
|
||||
.actions.prepend-top
|
||||
= f.submit 'Save', :class => "lbutton vm"
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
%tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) }
|
||||
%td
|
||||
= image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
||||
= truncate snippet.author.name, :lenght => 20
|
||||
%td= html_escape snippet.title
|
||||
%td= html_escape snippet.file_name
|
||||
%td
|
||||
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
||||
= link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "lbutton positive"
|
||||
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
||||
= link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
|
||||
- unless snippet.expired?
|
||||
%tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) }
|
||||
%td
|
||||
= image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
|
||||
= truncate snippet.author.name, :lenght => 20
|
||||
%td= html_escape snippet.title
|
||||
%td= html_escape snippet.file_name
|
||||
%td
|
||||
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
||||
= link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "lbutton positive"
|
||||
- if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
|
||||
= link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
%th Title
|
||||
%th File name
|
||||
%th
|
||||
= render @snippets
|
||||
= render @snippets.fresh
|
||||
:javascript
|
||||
$('.delete-snippet').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
$('.delete-snippet').live('ajax:success', function() {
|
||||
$(this).closest('tr').fadeOut(); });
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
%h2
|
||||
= "Snippet ##{@snippet.id} - #{@snippet.title}"
|
||||
- if !@snippet.expired?
|
||||
%h2
|
||||
= "Snippet ##{@snippet.id} - #{@snippet.title}"
|
||||
|
||||
.view_file
|
||||
.view_file_header
|
||||
%strong
|
||||
= @snippet.file_name
|
||||
%br/
|
||||
.view_file_content
|
||||
:erb
|
||||
<%= raw @snippet.colorize %>
|
||||
.view_file
|
||||
.view_file_header
|
||||
%strong
|
||||
= @snippet.file_name
|
||||
%br/
|
||||
.view_file_content
|
||||
:erb
|
||||
<%= raw @snippet.colorize %>
|
||||
|
||||
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
||||
= link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive"
|
||||
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
||||
= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
|
||||
.clear
|
||||
%br
|
||||
.snippet_notes= render "notes/notes"
|
||||
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
||||
= link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive"
|
||||
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
||||
= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
|
||||
.clear
|
||||
%br
|
||||
.snippet_notes= render "notes/notes"
|
||||
|
||||
.clear
|
||||
.clear
|
||||
|
||||
- else
|
||||
%h2
|
||||
Sorry, this snippet is no longer exists
|
||||
|
|
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}"
|
||||
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
%td= truncate user.email, :lenght => 16
|
||||
- if can? current_user, :admin_project, @project
|
||||
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
|
||||
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
|
||||
%td= f.check_box :read, :onclick => "$(this.form).submit();"
|
||||
%td= f.check_box :write, :onclick => "$(this.form).submit();"
|
||||
%td= f.check_box :admin, :onclick => "$(this.form).submit();"
|
||||
- else
|
||||
- else
|
||||
%td= check_box_tag "read", 1, member.read, :disabled => :disabled
|
||||
%td= check_box_tag "commit", 1, member.write, :disabled => :disabled
|
||||
%td= check_box_tag "admin", 1, member.admin, :disabled => :disabled
|
||||
|
|
|
@ -25,4 +25,3 @@
|
|||
%b Twitter:
|
||||
= user.twitter
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue