Bootstrap: Activities
This commit is contained in:
parent
15b06b0164
commit
0a4222fb98
26 changed files with 324 additions and 365 deletions
|
@ -1,79 +1,29 @@
|
|||
- if update.kind_of?(Note)
|
||||
%a.project-update.titled{:href => dashboard_feed_path(project, update)}
|
||||
= image_tag gravatar_icon(update.author_email), :class => "avatar", :width => 32
|
||||
%div
|
||||
= dashboard_feed_title(update)
|
||||
%span.update-author
|
||||
%strong= update.author_name
|
||||
= time_ago_in_words(update.created_at)
|
||||
ago
|
||||
- noteable = update.target
|
||||
- if noteable.kind_of?(MergeRequest)
|
||||
.title-block
|
||||
%div
|
||||
%span.commit.tag
|
||||
Merge Request #
|
||||
= noteable.id
|
||||
%span.update-author
|
||||
%span= noteable.source_branch
|
||||
%li.wll
|
||||
.row
|
||||
.span9
|
||||
= image_tag gravatar_icon(update.author_email), :class => "avatar thumb"
|
||||
%p
|
||||
%strong.author= update.author_name
|
||||
%span
|
||||
–
|
||||
authored
|
||||
= time_ago_in_words(update.created_at)
|
||||
ago
|
||||
- if update.kind_of? MergeRequest
|
||||
= link_to project_merge_request_path(@project, update) do
|
||||
= "Opened merge request ##{update.id}."
|
||||
%span.label= update.source_branch
|
||||
→
|
||||
%span= noteable.target_branch
|
||||
|
||||
- elsif noteable.kind_of?(Issue)
|
||||
.title-block
|
||||
%div
|
||||
%span.commit.tag
|
||||
Issue #
|
||||
= noteable.id
|
||||
%span.update-author
|
||||
.left= truncate noteable.title
|
||||
|
||||
- elsif noteable.kind_of?(Commit)
|
||||
.title-block
|
||||
%div
|
||||
%span.commit.tag
|
||||
commit
|
||||
%span.update-author
|
||||
.left= truncate noteable.id
|
||||
- else
|
||||
.title-block
|
||||
%div
|
||||
%span.commit.tag
|
||||
Project Wall
|
||||
|
||||
|
||||
- elsif update.kind_of?(MergeRequest)
|
||||
%a.project-update.titled{:href => project_merge_request_path(project, update)}
|
||||
= image_tag gravatar_icon(update.author_email), :class => "avatar", :width => 32
|
||||
%div
|
||||
Opened merge request
|
||||
%span.update-author
|
||||
%strong= update.author_name
|
||||
= time_ago_in_words(update.created_at)
|
||||
ago
|
||||
.title-block
|
||||
%div
|
||||
%span.commit.tag
|
||||
Merge Request #
|
||||
= update.id
|
||||
%span.update-author
|
||||
%span= update.source_branch
|
||||
→
|
||||
%span= update.target_branch
|
||||
|
||||
- elsif update.kind_of?(Issue)
|
||||
%a.project-update.titled{:href => dashboard_feed_path(project, update)}
|
||||
= image_tag gravatar_icon(update.author_email), :class => "avatar", :width => 32
|
||||
%div
|
||||
Created new Issue
|
||||
%span.update-author
|
||||
%strong= update.author_name
|
||||
= time_ago_in_words(update.created_at)
|
||||
ago
|
||||
.title-block
|
||||
%div
|
||||
%span.commit.tag
|
||||
Issue #
|
||||
= update.id
|
||||
%span.update-author
|
||||
.left= truncate update.title
|
||||
%span.label= update.target_branch
|
||||
- elsif update.kind_of? Issue
|
||||
= link_to project_issue_path(@project, update) do
|
||||
Opened new
|
||||
%span.label.important= "issue ##{update.id}"
|
||||
= truncate update.title
|
||||
- else
|
||||
= link_to [@project, update.target] do
|
||||
%p
|
||||
= update.target.class.name.titleize
|
||||
= truncate(update.target.id.to_s, :length => 10)
|
||||
|
||||
= dashboard_feed_title(update)
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
%cite= "http://#{GIT_HOST["host"]}/"
|
||||
.input= f.text_field :code, :placeholder => "example"
|
||||
|
||||
- unless @project.new_record? || @project.heads.empty?
|
||||
.clearfix
|
||||
= f.label :default_branch, "Default Branch"
|
||||
.input= f.select(:default_branch, @project.heads.map(&:name), {}, :style => "width:300px;")
|
||||
- unless @project.new_record? || @project.heads.empty?
|
||||
.clearfix
|
||||
= f.label :default_branch, "Default Branch"
|
||||
.input= f.select(:default_branch, @project.heads.map(&:name), {}, :style => "width:210px;")
|
||||
|
||||
|
||||
.clearfix
|
||||
|
@ -30,9 +30,9 @@
|
|||
|
||||
%br
|
||||
|
||||
.merge-tabs
|
||||
.actions
|
||||
= f.submit 'Save', :class => "btn primary"
|
||||
|
||||
= link_to 'Cancel', @project, :class => "btn"
|
||||
- unless @project.new_record?
|
||||
.right
|
||||
= link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "btn"
|
||||
= link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger"
|
||||
|
|
|
@ -1,69 +1,29 @@
|
|||
= render "project_head"
|
||||
|
||||
= form_for(@project, :remote => true) do |f|
|
||||
%div
|
||||
%span.entity-info
|
||||
= link_to info_project_path(@project) do
|
||||
.entity-button
|
||||
Info
|
||||
%i
|
||||
%h2= @project.name
|
||||
%hr
|
||||
%table.no-borders
|
||||
-if @project.errors.any?
|
||||
%tr
|
||||
%td{:colspan => 2}
|
||||
#error_explanation
|
||||
- @project.errors.full_messages.each do |msg|
|
||||
%span= msg
|
||||
%br
|
||||
|
||||
%tr
|
||||
%td= f.label :name
|
||||
%td= f.text_field :name, :placeholder => "Example Project"
|
||||
%tr
|
||||
%td
|
||||
.left= f.label :path
|
||||
%cite.right= "git@#{GIT_HOST["host"]}:"
|
||||
%td
|
||||
= f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
|
||||
%tr
|
||||
%td
|
||||
.left= f.label :code
|
||||
%cite.right= "http://#{GIT_HOST["host"]}/"
|
||||
%td= f.text_field :code, :placeholder => "example"
|
||||
|
||||
- unless @project.new_record? || @project.heads.empty?
|
||||
%tr
|
||||
%td= f.label :default_branch, "Default Branch"
|
||||
%td= f.select(:default_branch, @project.heads.map(&:name), {}, :style => "width:300px;")
|
||||
|
||||
%tr
|
||||
%td= f.label :description
|
||||
%td= f.text_area :description, :placeholder => "project description", :style => "height:50px"
|
||||
|
||||
%br
|
||||
|
||||
.merge-tabs
|
||||
= f.submit 'Save', :class => "grey-button"
|
||||
|
||||
- unless @project.new_record?
|
||||
.right
|
||||
= link_to 'Remove', @project, :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
|
||||
|
||||
%h3 Edit Project
|
||||
%hr
|
||||
= render "projects/form"
|
||||
%div{ :class => "ajax_loader", :style => "display:none;height:200px;"}
|
||||
%center
|
||||
= image_tag "ajax-loader.gif", :class => "append-bottom"
|
||||
%h3.prepend-top Updating project & repository. Please wait for few minutes
|
||||
|
||||
:javascript
|
||||
$('.edit_project').bind('ajax:before', function() {
|
||||
$(".edit_project").hide();
|
||||
$('.ajax_loader').show();
|
||||
});
|
||||
%h3.prepend-top Saving project & repository. Please wait...
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
$('#project_default_branch').chosen();
|
||||
})
|
||||
$("#project_name").live("change", function(){
|
||||
var slug = slugify($(this).val());
|
||||
$("#project_code").val(slug);
|
||||
$("#project_path").val(slug);
|
||||
});
|
||||
});
|
||||
|
||||
function slugify(text) {
|
||||
return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('.edit_project').live('ajax:before', function() {
|
||||
$(this).hide();
|
||||
$('.ajax_loader').show();
|
||||
});
|
||||
$('form #project_default_branch').chosen();
|
||||
})
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
- if current_user.require_ssh_key?
|
||||
%ul.errors_holder
|
||||
%li You have no ssh keys added yo tour profile.
|
||||
%li You wont be able to pull/push repository.
|
||||
%li Visit profile → keys and add public key of every machine you want to use for work with gitlabhq.
|
||||
.alert-message.block-message.error
|
||||
%ul
|
||||
%li You have no ssh keys added yo tour profile.
|
||||
%li You wont be able to pull/push repository.
|
||||
%li Visit profile → keys and add public key of every machine you want to use for work with gitlabhq.
|
||||
|
||||
|
||||
%ul.alert_holder
|
||||
%li You should push repository to proceed.
|
||||
%li After push you will be able to browse code, commits etc.
|
||||
.alert-message.block-message.error
|
||||
%ul.alert_holder
|
||||
%li You should push repository to proceed.
|
||||
%li After push you will be able to browse code, commits etc.
|
||||
|
||||
- bash_lexer = Pygments::Lexer[:bash]
|
||||
%div.git-empty
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
%h3 Projects
|
||||
%h3
|
||||
Projects
|
||||
%small= "( #{current_user.projects.count} )"
|
||||
%hr
|
||||
- unless @projects.empty?
|
||||
%div.tile= render "tile"
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
= render "project_head"
|
||||
%h3= @project.name
|
||||
%br
|
||||
|
||||
%div
|
||||
%span.entity-info
|
||||
= link_to edit_project_path(@project) do
|
||||
.entity-button
|
||||
Edit
|
||||
%i
|
||||
%h2= @project.name
|
||||
%hr
|
||||
|
||||
|
||||
%table.no-borders
|
||||
%pre
|
||||
= "git clone #{@project.url_to_repo}"
|
||||
|
||||
|
||||
%table
|
||||
%tr
|
||||
%td Name
|
||||
%td= @project.name
|
||||
|
@ -17,6 +16,36 @@
|
|||
%tr
|
||||
%td Slug
|
||||
%td= @project.code
|
||||
|
||||
%tr
|
||||
%td Path
|
||||
%td= @project.path
|
||||
|
||||
%tr
|
||||
%td Owner
|
||||
%td= link_to @project.owner.name, project_team_member_path(@project, @project.team_member_by_id(@project.owner))
|
||||
|
||||
%tr
|
||||
%td Last commit
|
||||
%td
|
||||
= time_ago_in_words(@project.commit.committed_date)
|
||||
ago
|
||||
|
||||
%tr
|
||||
%td Team
|
||||
%td
|
||||
= @project.users_projects.count
|
||||
users
|
||||
|
||||
%tr
|
||||
%td Open Issues
|
||||
%td
|
||||
= @project.issues.opened.count
|
||||
|
||||
%tr
|
||||
%td Merge Requests
|
||||
%td
|
||||
= @project.merge_requests.opened.count
|
||||
|
||||
%tr
|
||||
%td Created
|
||||
|
@ -25,4 +54,6 @@
|
|||
%tr
|
||||
%td{:colspan => 2}= simple_format @project.description
|
||||
|
||||
.actions
|
||||
= link_to "Edit", edit_project_path(@project), :class => "btn"
|
||||
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
- content_for(:body_class, "project-page dashboard")
|
||||
|
||||
= render "project_head"
|
||||
#news-feed.news-feed
|
||||
.project-box.project-updates
|
||||
- @activities.each do |update|
|
||||
= render "projects/feed", :update => update, :project => @project
|
||||
|
||||
:javascript
|
||||
function updateDashboard(){
|
||||
$('.project-content').load("#{escape_javascript(project_path(@project))} .project-content>*");
|
||||
}
|
||||
setInterval("updateDashboard()", 300000);
|
||||
- @activities.each do |update|
|
||||
.alert-message.entry
|
||||
= link_to dashboard_feed_path(@project, update) do
|
||||
- if update.kind_of? Note
|
||||
%p
|
||||
%strong
|
||||
= update.target.class.name.titleize
|
||||
= truncate update.target.id.to_s, :length => 10
|
||||
commented
|
||||
–
|
||||
= image_tag gravatar_icon(update.author_email), :class => "", :width => 16
|
||||
= truncate dashboard_feed_title(update), :length => 50
|
||||
- else
|
||||
%p
|
||||
%strong
|
||||
= update.class.name.titleize
|
||||
= truncate update.id.to_s
|
||||
–
|
||||
= image_tag gravatar_icon(update.author_email), :class => "", :width => 16
|
||||
= truncate dashboard_feed_title(update), :length => 50
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue