Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
d641091d
Commit
d641091d
authored
Jan 17, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include Git commit details on Git details page
parent
52a66b5f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
0 deletions
+41
-0
weblate/html/git-commit-info.html
weblate/html/git-commit-info.html
+5
-0
weblate/html/js/git-status.html
weblate/html/js/git-status.html
+14
-0
weblate/media/css/style.css
weblate/media/css/style.css
+6
-0
weblate/media/js/loader.js
weblate/media/js/loader.js
+7
-0
weblate/trans/models.py
weblate/trans/models.py
+9
-0
No files found.
weblate/html/git-commit-info.html
0 → 100644
View file @
d641091d
{% load i18n %}
<span
class=
"git-details"
>
{% blocktrans with commit.hexsha as hash %}Commit {{ hash }}{% endblocktrans %}
<br
/>
{% blocktrans with commit.author.name as author %}Authored by {{ author }}{% endblocktrans %}
</span>
weblate/html/js/git-status.html
View file @
d641091d
...
@@ -30,6 +30,20 @@
...
@@ -30,6 +30,20 @@
<p>
{% trans "There are some new commits in local Git repository!" %}
</p>
<p>
{% trans "There are some new commits in local Git repository!" %}
</p>
{% endif %}
{% endif %}
{% if object.subproject_set %}
{% else %}
{% with object.get_last_remote_commit as commit %}
<p>
{% trans "Last remote commit:" %}
<span
class=
"git-commit"
>
{{ commit.hexsha|slice:":7" }}
{% include "git-commit-info.html" %}
</span>
</p>
{% endwith %}
{% endif %}
<div
class=
"details-accordion"
>
<div
class=
"details-accordion"
>
<h3><a
href=
"#"
>
{% trans "Details" %}
</a></h3>
<h3><a
href=
"#"
>
{% trans "Details" %}
</a></h3>
<div>
<div>
...
...
weblate/media/css/style.css
View file @
d641091d
...
@@ -294,3 +294,9 @@ img.avatar {
...
@@ -294,3 +294,9 @@ img.avatar {
width
:
1em
;
width
:
1em
;
height
:
1em
;
height
:
1em
;
}
}
span
.git-details
{
display
:
none
;
}
.ui-tooltip
{
max-width
:
30em
;
}
weblate/media/js/loader.js
View file @
d641091d
...
@@ -392,6 +392,13 @@ $(function() {
...
@@ -392,6 +392,13 @@ $(function() {
},
},
items
:
"
span.tooltip
"
items
:
"
span.tooltip
"
});
});
$
(
document
).
tooltip
({
content
:
function
()
{
var
element
=
$
(
this
).
find
(
'
.git-details
'
);
return
element
.
html
();
},
items
:
"
span.git-commit
"
});
if
(
update_lock
)
{
if
(
update_lock
)
{
window
.
setInterval
(
function
()
{
window
.
setInterval
(
function
()
{
$
.
get
(
$
(
'
#js-lock
'
).
attr
(
'
href
'
));
$
.
get
(
$
(
'
#js-lock
'
).
attr
(
'
href
'
));
...
...
weblate/trans/models.py
View file @
d641091d
...
@@ -767,6 +767,12 @@ class SubProject(models.Model):
...
@@ -767,6 +767,12 @@ class SubProject(models.Model):
# Fallback to initializing the repository
# Fallback to initializing the repository
return
git
.
Repo
.
init
(
path
)
return
git
.
Repo
.
init
(
path
)
def
get_last_remote_commit
(
self
):
'''
Returns latest remote commit we know.
'''
return
self
.
get_repo
().
commit
(
'origin/master'
)
def
get_repoweb_link
(
self
,
filename
,
line
):
def
get_repoweb_link
(
self
,
filename
,
line
):
'''
'''
Generates link to source code browser for given file and line.
Generates link to source code browser for given file and line.
...
@@ -1842,6 +1848,9 @@ class Translation(models.Model):
...
@@ -1842,6 +1848,9 @@ class Translation(models.Model):
def
get_repo
(
self
):
def
get_repo
(
self
):
return
self
.
subproject
.
get_repo
()
return
self
.
subproject
.
get_repo
()
def
get_last_remote_commit
(
self
):
return
self
.
subproject
.
get_last_remote_commit
()
def
do_update
(
self
,
request
=
None
):
def
do_update
(
self
,
request
=
None
):
return
self
.
subproject
.
do_update
(
request
)
return
self
.
subproject
.
do_update
(
request
)
...
...
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