Commits

Ivan Melnikov committed 2c3090d Draft

Show user name in page history

Comments (0)

Files changed (4)

 
 - url: /\.user.*
   script: user.app
+  login: required
 
 - url: /.*
   script: page.app
 			'history': history, 
 			'html': convert(history.html()),
 			'breadcrumbs': breadcrumbs(path),
+			'user': get_user(history.user_id)
 		}
 		template = jinja_environment.get_template('show.html')
 		self.response.out.write(template.render(values))

template/page/history.html

 {% for item in history %}
 <div>
 	<a href="{{ page.upath() }}/.show?id={{ item.key().id() }}">{{ item.updated | format }}</a>
+	{{ item.user_id | user_name }}
 </div>
 {% endfor %}
 

template/page/show.html

 
 <div class="page-updated">
 Изменения от {{ history.updated | format }}
+{{ user.name }}
 </div>
 
 <div class="page-text">