Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
e64a1749
Commit
e64a1749
authored
Feb 05, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project membership widget. css fixes
parent
96b53a9f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
41 deletions
+54
-41
app/assets/stylesheets/reset_bootstrap.scss
app/assets/stylesheets/reset_bootstrap.scss
+4
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-0
app/models/users_project.rb
app/models/users_project.rb
+8
-0
app/views/devise/sessions/new.html.erb
app/views/devise/sessions/new.html.erb
+1
-1
app/views/layouts/_project_side_right.html.haml
app/views/layouts/_project_side_right.html.haml
+2
-40
app/views/widgets/_project_member.html.haml
app/views/widgets/_project_member.html.haml
+28
-0
app/views/widgets/_recent_projects.html.haml
app/views/widgets/_recent_projects.html.haml
+10
-0
No files found.
app/assets/stylesheets/reset_bootstrap.scss
View file @
e64a1749
...
...
@@ -36,3 +36,7 @@ a {
}
}
.widget
{
padding
:
20px
;
margin-bottom
:
20px
;
}
app/controllers/projects_controller.rb
View file @
e64a1749
...
...
@@ -96,6 +96,7 @@ class ProjectsController < ApplicationController
end
def
graph
render_full_content
@days_json
,
@commits_json
=
GraphCommit
.
to_graph
(
project
)
end
...
...
app/models/users_project.rb
View file @
e64a1749
...
...
@@ -32,6 +32,14 @@ class UsersProject < ActiveRecord::Base
c
.
update_project
(
project
.
path
,
project
)
end
end
def
project_access_human
Project
.
access_options
.
key
(
self
.
project_access
)
end
def
repo_access_human
Repository
.
access_options
.
key
(
self
.
repo_access
)
end
end
# == Schema Information
#
...
...
app/views/devise/sessions/new.html.erb
View file @
e64a1749
...
...
@@ -4,7 +4,7 @@
<%=
f
.
password_field
:password
,
:class
=>
"text bottom"
,
:placeholder
=>
"Password"
%>
<%
if
devise_mapping
.
rememberable?
-%>
<div
class=
"clearfix"
>
<%=
f
.
label
:remember_me
%><%=
f
.
check_box
:remember_me
%>
</div>
<div
class=
"clearfix"
>
<%=
f
.
label
:remember_me
%>
<%=
f
.
check_box
:remember_me
%>
</div>
<%
end
-%>
<br/>
<%=
f
.
submit
"Sign in"
,
:class
=>
"primary btn"
%>
...
...
app/views/layouts/_project_side_right.html.haml
View file @
e64a1749
...
...
@@ -4,43 +4,5 @@
-
else
-
if
content_for?
:sidebar_top_block
=
yield
:sidebar_top_block
-
else
-
if
can?
current_user
,
:write_project
,
@project
.alert-message.block-message.info
You have access to create new issue or merge request.
%div
=
link_to
new_project_issue_path
(
@project
),
:title
=>
"New Issue"
,
:class
=>
"btn small"
do
New Issue »
%div
=
link_to
new_project_merge_request_path
(
@project
),
:title
=>
"New Merge Request"
,
:class
=>
"btn small"
do
New Merge Request »
-
if
current_user
.
projects
.
count
>
0
%div
.entry
%h5
Recent Projects:
%ul
-
current_user
.
projects
.
order
(
"id DESC"
).
limit
(
5
).
each
do
|
project
|
%li
=
link_to
project_path
(
project
)
do
=
project
.
name
=
link_to
"More » "
,
projects_path
-#%h4
-#Recent Issues:
-#%ul
-#- current_user.assigned_issues.order("id DESC").limit(5).each do |issue|
-#%li
-#= link_to project_issue_path(issue.project, issue) do
-#= truncate issue.title
-#%h4
-#Recent Requests:
-#%ul
-#- current_user.assigned_merge_requests.order("id DESC").limit(5).each do |issue|
-#%li
-#= link_to project_merge_request_path(issue.project, issue) do
-#= truncate issue.title
=
render
"widgets/project_member"
=
render
"widgets/recent_projects"
app/views/widgets/_project_member.html.haml
0 → 100644
View file @
e64a1749
-
member
=
@project
.
team_member_by_id
(
current_user
.
id
)
.widget
.media-grid
%li
=
link_to
project_team_member_path
(
@project
,
member
),
:title
=>
current_user
.
name
do
=
image_tag
gravatar_icon
(
current_user
.
email
,
90
),
:class
=>
"thumbnail"
.row
.span4
%h4
=
truncate
(
current_user
.
name
,
:lenght
=>
24
)
-
if
@project
.
owner
==
current_user
%span
.label
Project Owner
.span3
%span
.label
=
member
.
project_access_human
%span
.label
=
member
.
repo_access_human
-
if
can?
current_user
,
:write_project
,
@project
%hr
.span3
%p
You have access to create new issue or merge request.
%div
=
link_to
new_project_issue_path
(
@project
),
:title
=>
"New Issue"
,
:class
=>
""
do
New Issue »
%div
=
link_to
new_project_merge_request_path
(
@project
),
:title
=>
"New Merge Request"
,
:class
=>
""
do
New Merge Request »
app/views/widgets/_recent_projects.html.haml
0 → 100644
View file @
e64a1749
-
if
current_user
.
projects
.
count
>
0
%div
.widget
%h4
Recent Projects:
%ul
-
current_user
.
projects
.
order
(
"id DESC"
).
limit
(
5
).
each
do
|
project
|
%li
=
link_to
project_path
(
project
)
do
=
project
.
name
=
link_to
"More » "
,
projects_path
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment