Commit 0ee296d1fa346ed7d3235a55959ffdccf550878c

Authored by Dmitriy Zaporozhets
1 parent 7f03b320

Replace pygments with hljs for system hooks help page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/views/admin/hooks/_data_ex.html.erb
... ... @@ -1,71 +0,0 @@
1   -<% data_ex_str = <<eos
2   -1. Project created:
3   -{
4   - "created_at": "2012-07-21T07:30:54Z",
5   - "event_name": "project_create",
6   - "name": "StoreCloud",
7   - "owner_email": "johnsmith@gmail.com"
8   - "owner_name": "John Smit",
9   - "path": "stormcloud",
10   - "path_with_namespace": "jsmith/stormcloud",
11   - "project_id": 74,
12   -}
13   -
14   -2. Project destroyed:
15   -{
16   - "created_at": "2012-07-21T07:30:58Z",
17   - "event_name": "project_destroy",
18   - "name": "Underscore",
19   - "owner_email": "johnsmith@gmail.com"
20   - "owner_name": "John Smith",
21   - "path": "underscore",
22   - "path_with_namespace": "jsmith/underscore",
23   - "project_id": 73,
24   -}
25   -
26   -3. New Team Member:
27   -{
28   - "created_at": "2012-07-21T07:30:56Z",
29   - "event_name": "user_add_to_team",
30   - "project_access": "Master",
31   - "project_id": 74,
32   - "project_name": "StoreCloud",
33   - "project_path": "storecloud",
34   - "user_email": "johnsmith@gmail.com",
35   - "user_name": "John Smith",
36   -}
37   -
38   -4. Team Member Removed:
39   -{
40   - "created_at": "2012-07-21T07:30:56Z",
41   - "event_name": "user_remove_from_team",
42   - "project_access": "Master",
43   - "project_id": 74,
44   - "project_name": "StoreCloud",
45   - "project_path": "storecloud",
46   - "user_email": "johnsmith@gmail.com",
47   - "user_name": "John Smith",
48   -}
49   -
50   -5. User created:
51   -{
52   - "created_at": "2012-07-21T07:44:07Z",
53   - "email": "js@gitlabhq.com",
54   - "event_name": "user_create",
55   - "name": "John Smith",
56   - "user_id": 41
57   -}
58   -
59   -6. User removed:
60   -{
61   - "created_at": "2012-07-21T07:44:07Z",
62   - "email": "js@gitlabhq.com",
63   - "event_name": "user_destroy",
64   - "name": "John Smith",
65   - "user_id": 41
66   -}
67   -
68   -eos
69   -%>
70   -<% js_lexer = Pygments::Lexer[:js] %>
71   -<%= raw js_lexer.highlight(data_ex_str) %>
app/views/admin/hooks/_data_ex.html.haml 0 → 100644
... ... @@ -0,0 +1,67 @@
  1 += highlight_js do
  2 + :erb
  3 + 1. Project created:
  4 + {
  5 + "created_at": "2012-07-21T07:30:54Z",
  6 + "event_name": "project_create",
  7 + "name": "StoreCloud",
  8 + "owner_email": "johnsmith@gmail.com"
  9 + "owner_name": "John Smit",
  10 + "path": "stormcloud",
  11 + "path_with_namespace": "jsmith/stormcloud",
  12 + "project_id": 74,
  13 + }
  14 +
  15 + 2. Project destroyed:
  16 + {
  17 + "created_at": "2012-07-21T07:30:58Z",
  18 + "event_name": "project_destroy",
  19 + "name": "Underscore",
  20 + "owner_email": "johnsmith@gmail.com"
  21 + "owner_name": "John Smith",
  22 + "path": "underscore",
  23 + "path_with_namespace": "jsmith/underscore",
  24 + "project_id": 73,
  25 + }
  26 +
  27 + 3. New Team Member:
  28 + {
  29 + "created_at": "2012-07-21T07:30:56Z",
  30 + "event_name": "user_add_to_team",
  31 + "project_access": "Master",
  32 + "project_id": 74,
  33 + "project_name": "StoreCloud",
  34 + "project_path": "storecloud",
  35 + "user_email": "johnsmith@gmail.com",
  36 + "user_name": "John Smith",
  37 + }
  38 +
  39 + 4. Team Member Removed:
  40 + {
  41 + "created_at": "2012-07-21T07:30:56Z",
  42 + "event_name": "user_remove_from_team",
  43 + "project_access": "Master",
  44 + "project_id": 74,
  45 + "project_name": "StoreCloud",
  46 + "project_path": "storecloud",
  47 + "user_email": "johnsmith@gmail.com",
  48 + "user_name": "John Smith",
  49 + }
  50 +
  51 + 5. User created:
  52 + {
  53 + "created_at": "2012-07-21T07:44:07Z",
  54 + "email": "js@gitlabhq.com",
  55 + "event_name": "user_create",
  56 + "name": "John Smith",
  57 + "user_id": 41
  58 + }
  59 +
  60 + 6. User removed:
  61 + {
  62 + "created_at": "2012-07-21T07:44:07Z",
  63 + "email": "js@gitlabhq.com",
  64 + "event_name": "user_destroy",
  65 + "name": "John Smith",
  66 + "user_id": 41
  67 + }
... ...