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
612014df
Commit
612014df
authored
Mar 26, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to include branch name in link
parent
85b10edf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
trans/models.py
trans/models.py
+6
-2
No files found.
trans/models.py
View file @
612014df
...
@@ -76,7 +76,7 @@ class SubProject(models.Model):
...
@@ -76,7 +76,7 @@ class SubProject(models.Model):
project
=
models
.
ForeignKey
(
Project
)
project
=
models
.
ForeignKey
(
Project
)
repo
=
models
.
CharField
(
max_length
=
200
,
help_text
=
_
(
'URL of Git repository'
))
repo
=
models
.
CharField
(
max_length
=
200
,
help_text
=
_
(
'URL of Git repository'
))
repoweb
=
models
.
URLField
(
repoweb
=
models
.
URLField
(
help_text
=
_
(
'Link to repository browser, use %(file)s and %(line)s as filename and line placeholders'
),
help_text
=
_
(
'Link to repository browser, use %(
branch)s for branch, %(
file)s and %(line)s as filename and line placeholders'
),
validators
=
[
validate_repoweb
])
validators
=
[
validate_repoweb
])
branch
=
models
.
CharField
(
max_length
=
50
,
help_text
=
_
(
'Git branch to translate'
))
branch
=
models
.
CharField
(
max_length
=
50
,
help_text
=
_
(
'Git branch to translate'
))
filemask
=
models
.
CharField
(
max_length
=
200
,
help_text
=
_
(
'Mask of files to translate, use * instead of language code'
))
filemask
=
models
.
CharField
(
max_length
=
200
,
help_text
=
_
(
'Mask of files to translate, use * instead of language code'
))
...
@@ -108,7 +108,11 @@ class SubProject(models.Model):
...
@@ -108,7 +108,11 @@ class SubProject(models.Model):
return
git
.
Repo
.
init
(
p
)
return
git
.
Repo
.
init
(
p
)
def
get_repoweb_link
(
self
,
filename
,
line
):
def
get_repoweb_link
(
self
,
filename
,
line
):
return
self
.
repoweb
%
{
'file'
:
filename
,
'line'
:
line
}
return
self
.
repoweb
%
{
'file'
:
filename
,
'line'
:
line
,
'branch'
:
self
.
branch
}
def
configure_repo
(
self
):
def
configure_repo
(
self
):
'''
'''
...
...
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