summaryrefslogtreecommitdiff
path: root/app/views/admin/hooks
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-30 18:31:24 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-30 18:31:24 +0200
commit0ee296d1fa346ed7d3235a55959ffdccf550878c (patch)
tree513e6abdbbb7bdfa0c7f66304365e7c1ed31cbce /app/views/admin/hooks
parent7f03b32049e93bbe84b63ced9c8493fc2f2a0b98 (diff)
downloadgitlab-ce-0ee296d1fa346ed7d3235a55959ffdccf550878c.tar.gz
Replace pygments with hljs for system hooks help page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/admin/hooks')
-rw-r--r--app/views/admin/hooks/_data_ex.html.erb71
-rw-r--r--app/views/admin/hooks/_data_ex.html.haml67
2 files changed, 67 insertions, 71 deletions
diff --git a/app/views/admin/hooks/_data_ex.html.erb b/app/views/admin/hooks/_data_ex.html.erb
deleted file mode 100644
index 5b16dfb398a..00000000000
--- a/app/views/admin/hooks/_data_ex.html.erb
+++ /dev/null
@@ -1,71 +0,0 @@
-<% data_ex_str = <<eos
-1. Project created:
-{
- "created_at": "2012-07-21T07:30:54Z",
- "event_name": "project_create",
- "name": "StoreCloud",
- "owner_email": "johnsmith@gmail.com"
- "owner_name": "John Smit",
- "path": "stormcloud",
- "path_with_namespace": "jsmith/stormcloud",
- "project_id": 74,
-}
-
-2. Project destroyed:
-{
- "created_at": "2012-07-21T07:30:58Z",
- "event_name": "project_destroy",
- "name": "Underscore",
- "owner_email": "johnsmith@gmail.com"
- "owner_name": "John Smith",
- "path": "underscore",
- "path_with_namespace": "jsmith/underscore",
- "project_id": 73,
-}
-
-3. New Team Member:
-{
- "created_at": "2012-07-21T07:30:56Z",
- "event_name": "user_add_to_team",
- "project_access": "Master",
- "project_id": 74,
- "project_name": "StoreCloud",
- "project_path": "storecloud",
- "user_email": "johnsmith@gmail.com",
- "user_name": "John Smith",
-}
-
-4. Team Member Removed:
-{
- "created_at": "2012-07-21T07:30:56Z",
- "event_name": "user_remove_from_team",
- "project_access": "Master",
- "project_id": 74,
- "project_name": "StoreCloud",
- "project_path": "storecloud",
- "user_email": "johnsmith@gmail.com",
- "user_name": "John Smith",
-}
-
-5. User created:
-{
- "created_at": "2012-07-21T07:44:07Z",
- "email": "js@gitlabhq.com",
- "event_name": "user_create",
- "name": "John Smith",
- "user_id": 41
-}
-
-6. User removed:
-{
- "created_at": "2012-07-21T07:44:07Z",
- "email": "js@gitlabhq.com",
- "event_name": "user_destroy",
- "name": "John Smith",
- "user_id": 41
-}
-
-eos
-%>
-<% js_lexer = Pygments::Lexer[:js] %>
-<%= raw js_lexer.highlight(data_ex_str) %>
diff --git a/app/views/admin/hooks/_data_ex.html.haml b/app/views/admin/hooks/_data_ex.html.haml
new file mode 100644
index 00000000000..9861e372efc
--- /dev/null
+++ b/app/views/admin/hooks/_data_ex.html.haml
@@ -0,0 +1,67 @@
+= highlight_js do
+ :erb
+ 1. Project created:
+ {
+ "created_at": "2012-07-21T07:30:54Z",
+ "event_name": "project_create",
+ "name": "StoreCloud",
+ "owner_email": "johnsmith@gmail.com"
+ "owner_name": "John Smit",
+ "path": "stormcloud",
+ "path_with_namespace": "jsmith/stormcloud",
+ "project_id": 74,
+ }
+
+ 2. Project destroyed:
+ {
+ "created_at": "2012-07-21T07:30:58Z",
+ "event_name": "project_destroy",
+ "name": "Underscore",
+ "owner_email": "johnsmith@gmail.com"
+ "owner_name": "John Smith",
+ "path": "underscore",
+ "path_with_namespace": "jsmith/underscore",
+ "project_id": 73,
+ }
+
+ 3. New Team Member:
+ {
+ "created_at": "2012-07-21T07:30:56Z",
+ "event_name": "user_add_to_team",
+ "project_access": "Master",
+ "project_id": 74,
+ "project_name": "StoreCloud",
+ "project_path": "storecloud",
+ "user_email": "johnsmith@gmail.com",
+ "user_name": "John Smith",
+ }
+
+ 4. Team Member Removed:
+ {
+ "created_at": "2012-07-21T07:30:56Z",
+ "event_name": "user_remove_from_team",
+ "project_access": "Master",
+ "project_id": 74,
+ "project_name": "StoreCloud",
+ "project_path": "storecloud",
+ "user_email": "johnsmith@gmail.com",
+ "user_name": "John Smith",
+ }
+
+ 5. User created:
+ {
+ "created_at": "2012-07-21T07:44:07Z",
+ "email": "js@gitlabhq.com",
+ "event_name": "user_create",
+ "name": "John Smith",
+ "user_id": 41
+ }
+
+ 6. User removed:
+ {
+ "created_at": "2012-07-21T07:44:07Z",
+ "email": "js@gitlabhq.com",
+ "event_name": "user_destroy",
+ "name": "John Smith",
+ "user_id": 41
+ }