• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


コミットメタ情報

リビジョン6de70c4c37748f259f646cdeb350fae4d6921869 (tree)
日時2012-05-17 04:06:46
作者Eugene “Stilgar“ Gilewski <developer@gile...>
コミッターCory Johns

ログメッセージ

ticket:42: Added new field to fork page for custom mount label.

変更サマリ

差分

--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -61,7 +61,7 @@ class RepoRootController(BaseController):
6161
6262 @with_trailing_slash
6363 @expose('jinja:allura:templates/repo/fork.html')
64- def fork(self, to_name=None, project_id=None):
64+ def fork(self, to_name=None, project_id=None, mount_label=None):
6565 # this shows the form and handles the submission
6666 security.require_authenticated()
6767 if not c.app.forkable: raise exc.HTTPNotFound
@@ -70,10 +70,12 @@ class RepoRootController(BaseController):
7070 ThreadLocalORMSession.close_all()
7171 from_project = c.project
7272 to_project = M.Project.query.get(_id=ObjectId(project_id))
73+ mount_label = mount_label or '%s - Code' % c.project.name
7374 if request.method != 'POST' or not to_name:
7475 return dict(from_repo=from_repo,
7576 user_project=c.user.private_project(),
76- to_name=to_name or '')
77+ to_name=to_name or '',
78+ mount_label=mount_label)
7779 else:
7880 with h.push_config(c, project=to_project):
7981 if not to_project.database_configured:
@@ -81,7 +83,9 @@ class RepoRootController(BaseController):
8183 security.require(security.has_access(to_project, 'admin'))
8284 try:
8385 to_project.install_app(
84- from_repo.tool_name, to_name,
86+ ep_name=from_repo.tool_name,
87+ mount_point=to_name,
88+ mount_label=mount_label,
8589 cloned_from_project_id=from_project._id,
8690 cloned_from_repo_id=from_repo._id)
8791 redirect(to_project.url()+to_name+'/')
--- a/Allura/allura/templates/repo/fork.html
+++ b/Allura/allura/templates/repo/fork.html
@@ -20,6 +20,10 @@
2020 <div class="grid-15">
2121 <input type="text" name="to_name" value="{{to_name}}"/>
2222 </div>
23+ <label class="grid-4" for="mount_label">Mount label:</label>
24+ <div class="grid-15">
25+ <input type="text" name="mount_label" value="{{mount_label}}"/>
26+ </div>
2327 <label class="grid-4">&nbsp;</label>
2428 <div class="grid-15">
2529 <input type="submit" value="Fork"/>