##// END OF EJS Templates
gists: fixed cache problems and updated ui
marcink -
r3869:816873d4 default
parent child Browse files
Show More
@@ -432,8 +432,10 b' class BaseRepository(object):'
432 432 def append_commit_id(self, commit_id):
433 433 if commit_id not in self.commit_ids:
434 434 self._rebuild_cache(self.commit_ids + [commit_id])
435 # clear cache
436 self._invalidate_prop_cache('commit_ids')
435
436 # clear cache
437 self._invalidate_prop_cache('commit_ids')
438 self._is_empty = False
437 439
438 440 def get_commit(self, commit_id=None, commit_idx=None, pre_load=None, translate_tag=None):
439 441 """
@@ -824,7 +824,7 b' class RepoModel(BaseModel):'
824 824
825 825 def _create_filesystem_repo(self, repo_name, repo_type, repo_group,
826 826 clone_uri=None, repo_store_location=None,
827 use_global_config=False):
827 use_global_config=False, install_hooks=True):
828 828 """
829 829 makes repository on filesystem. It's group aware means it'll create
830 830 a repository within a group, and alter the paths accordingly of
@@ -890,7 +890,8 b' class RepoModel(BaseModel):'
890 890 repo_path, config=config, create=True, src_url=clone_uri,
891 891 with_wire={"cache": False})
892 892
893 repo.install_hooks()
893 if install_hooks:
894 repo.install_hooks()
894 895
895 896 log.debug('Created repo %s with %s backend',
896 897 safe_unicode(repo_name), safe_unicode(repo_type))
@@ -8,9 +8,7 b''
8 8 %endif
9 9 </%def>
10 10
11 <%def name="breadcrumbs_links()">
12 ${_('New Gist')}
13 </%def>
11 <%def name="breadcrumbs_links()"></%def>
14 12
15 13 <%def name="menu_bar_nav()">
16 14 ${self.menu_items(active='gists')}
@@ -20,46 +18,47 b''
20 18 <div class="box">
21 19 <!-- box / title -->
22 20 <div class="title">
23 ${self.breadcrumbs()}
21
24 22 </div>
25 23
26 24 <div class="table">
27 25 <div id="files_data">
28 26 ${h.secure_form(h.route_path('gists_create'), id='eform', request=request)}
29 27 <div>
30 <textarea id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
31
32 28 <span class="gist-gravatar">
33 29 ${self.gravatar(c.rhodecode_user.email, 30)}
34 30 </span>
35 <label for='gistid'>${_('Gist id')}</label>
36 ${h.text('gistid', placeholder=_('Auto generated'))}
31 <label for='gistid'>${_('Gist id')}</label>
32 ${h.text('gistid', placeholder=_('Auto generated'))}
33
34 <label for='lifetime'>${_('Gist lifetime')}</label>
35 ${h.dropdownmenu('lifetime', '', c.lifetime_options)}
37 36
38 <label for='lifetime'>${_('Gist lifetime')}</label>
39 ${h.dropdownmenu('lifetime', '', c.lifetime_options)}
37 <label for='acl_level'>${_('Gist access level')}</label>
38 ${h.dropdownmenu('gist_acl_level', '', c.acl_options)}
40 39
41 <label for='acl_level'>${_('Gist access level')}</label>
42 ${h.dropdownmenu('gist_acl_level', '', c.acl_options)}
40 <textarea style="margin-top: 5px" id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
41 </div>
43 42
44 </div>
45 43 <div id="codeblock" class="codeblock">
46 44 <div class="code-header">
47 45 <div class="form">
48 46 <div class="fields">
49 ${h.text('filename', size=30, placeholder=_('name this file...'))}
47 ${h.text('filename', size=30, placeholder=_('name gist file...'))}
50 48 ${h.dropdownmenu('mimetype','plain',[('plain',_('plain'))],enable_filter=True)}
51 49 </div>
52 50 </div>
53 51 </div>
52
54 53 <div id="editor_container">
55 54 <div id="editor_pre"></div>
56 55 <textarea id="editor" name="content" ></textarea>
57 56 </div>
58 57 </div>
58
59 59 <div class="pull-right">
60 60 ${h.submit('private',_('Create Private Gist'),class_="btn")}
61 61 ${h.submit('public',_('Create Public Gist'),class_="btn")}
62 ${h.reset('reset',_('Reset'),class_="btn")}
63 62 </div>
64 63 ${h.end_form()}
65 64 </div>
General Comments 0
You need to be logged in to leave comments. Login now