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