aboutsummaryrefslogtreecommitdiffstats
path: root/public/admin/view/template/marketplace/openbay.twig
blob: 1a4a71507aa701b675a457e59602d6bd19558417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <h1>{{ heading_title }}</h1>
      <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
        <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ul>
    </div>
  </div>
  <div class="container-fluid"> {% if success %}
    <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %}
    {% if error %}
    {% for error_message in error %}
    <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_message }}</div>
    {% endfor %}
    {% endif %}
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-puzzle-piece"></i> {{ text_dashboard }}</h3>
      </div>
      <div class="panel-body">
        <div class="row">
          <div class="col-md-6">
            <div class="row">
              <div class="col-md-12">
                <table class="table table-bordered table-hover">
                  <thead>
                    <tr>
                      <td class="text-left" width="60%">{{ column_name }}</td>
                      <td class="text-center" width="20%">{{ column_status }}</td>
                      <td class="text-right" width="20%">{{ column_action }}</td>
                    </tr>
                  </thead>
                  <tbody>

                  {% for extension in extensions %}
                  <tr>
                    <td class="text-left">{{ extension.name }}</td>
                    <td class="text-center">{{ extension.status }}</td>
                    <td class="text-right"> {% if not extension.installed %} <a href="{{ extension.install }}" data-toggle="tooltip" title="{{ button_install }}" class="btn btn-success" id="button-install-{{ extension.code }}"><i class="fa fa-plus-circle"></i></a> {% else %} <a href="{{ extension.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary" id="button-edit-{{ extension.code }}"><i class="fa fa-pencil"></i></a> <a onclick="confirm('{{ text_confirm }}') ? location.href='{{ extension.uninstall }}' : false;" data-toggle="tooltip" title="{{ button_uninstall }}" class="btn btn-danger" id="button-uninstall-{{ extension.code }}"><i class="fa fa-minus-circle"></i></a> {% endif %}</td>
                  </tr>
                  {% endfor %}
                    </tbody>

                </table>
              </div>
            </div>
            <div class="row">
              <div class="col-md-12 text-center">
                <div class="row">
                  <div class="col-md-4 text-center">
                    <div class="well"> <a href="{{ product_link }}"> <span class="fa-stack fa-2x"> <i class="fa fa-square-o fa-stack-2x"></i> <i class="fa fa-tags fa-stack-1x"></i> </span>
                      <h4>{{ text_products }}</h4>
                      </a> </div>
                  </div>
                  <div class="col-md-4 text-center">
                    <div class="well"> <a href="{{ order_link }}"> <span class="fa-stack fa-2x"> <i class="fa fa-square-o fa-stack-2x"></i> <i class="fa fa-shopping-cart fa-stack-1x"></i> </span>
                      <h4>{{ text_orders }}</h4>
                      </a> </div>
                  </div>
                  <div class="col-md-4 text-center">
                    <div class="well"> <a href="{{ manage_link }}"> <span class="fa-stack fa-2x"> <i class="fa fa-square-o fa-stack-2x"></i> <i class="fa fa-wrench fa-stack-1x"></i> </span>
                      <h4>{{ text_manage }}</h4>
                      </a> </div>
                  </div>
                  <div class="col-md-4 text-center">
                    <div class="well"> <a href="http://www.openbaypro.com/help" target="_BLANK"> <span class="fa-stack fa-2x"> <i class="fa fa-square-o fa-stack-2x"></i> <i class="fa fa-comments-o fa-stack-1x"></i> </span>
                      <h4>{{ text_help }}</h4>
                      </a> </div>
                  </div>
                  <div class="col-md-4 text-center">
                    <div class="well"> <a href="http://www.openbaypro.com/tutorials" target="_BLANK"> <span class="fa-stack fa-2x"> <i class="fa fa-square-o fa-stack-2x"></i> <i class="fa fa-youtube-play fa-stack-1x"></i> </span>
                      <h4>{{ text_tutorials }}</h4>
                      </a> </div>
                  </div>
                  <div class="col-md-4 text-center">
                    <div class="well"> <a href="http://www.openbaypro.com/suggestions" target="_BLANK"> <span class="fa-stack fa-2x"> <i class="fa fa-square-o fa-stack-2x"></i> <i class="fa fa-bullhorn fa-stack-1x"></i> </span>
                      <h4>{{ text_suggestions }}</h4>
                      </a> </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="col-md-6" style="padding-left:10px;">
            <div id="openbay-version" class="alert alert-info text-left">
              <div id="openbay-version-loading"> <i class="fa fa-cog fa-lg fa-spin"></i> {{ text_version_check }} </div>
            </div>
            <div id="openbay-notification" class="alert alert-info text-left">
              <div id="openbay-loading"> <i class="fa fa-cog fa-lg fa-spin"></i> {{ text_getting_messages }} </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script type="text/javascript"><!--
  function version() {
    var version = '{{ feed_openbaypro_version }}';

    $('#openbay-version').empty().html('<div id="openbay-version-loading"><i class="fa fa-cog fa-lg fa-spin"></i> {{ text_version_check }}</div>');

    setTimeout(function () {
      $.ajax({
        type: 'GET',
        url: 'index.php?route=marketplace/openbay/version&user_token={{ user_token }}',
        dataType: 'json',
        success: function (json) {
          $('#openbay-version-loading').hide();

          if (json.error) {
            $('#openbay-version').removeClass('attention').addClass('alert-warning').append(json.msg);
          } else {
            if (version < json.version) {
              $('#openbay-version').removeClass('attention').addClass('alert-warning').append('<i class="fa fa-warning"></i> {{ text_version_current }} v.' + version + ', {{ text_version_available }} v.' + json.version);
            } else {
              $('#openbay-version').removeClass('attention').addClass('alert-success').append('<i class="fa fa-check"></i> {{ text_version_latest }} (v.' + version + ')');
            }
          }
        },
        failure: function () {
          $('#openbay-version').html('{{ error_failed }}<strong><span onclick="version();">{{ button_retry }}</span></strong>');
        },
        error: function (xhr, ajaxOptions, thrownError) {
          if (xhr.status != 0) {
            alert(xhr.status + "\r\n" + thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
          }
        }
      });
    }, 500);
  }

  function getNotifications() {
    $('#openbay-notification').empty().html('<div id="openbay-loading"><i class="fa fa-cog fa-lg fa-spin"></i> {{ text_getting_messages }}</div>');

    setTimeout(function () {
      $.ajax({
        type: 'GET',
        url: 'index.php?route=marketplace/openbay/notifications&user_token={{ user_token }}',
        dataType: 'json',
        success: function (json) {
          html = '<h4><i class="fa fa-info-circle"></i>  {{ text_title_messages }}</h4>';
          html += '<ul>';
          $.each(json, function (key, val) {
            html += '<li>' + val + '</li>';
          });
          html += '</ul>';

          $('#openbay-notification').html(html);
        },
        error: function (xhr, ajaxOptions, thrownError) {
          if (xhr.status != 0) {
            alert(xhr.status + "\r\n" +thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
          }
        }
      });
    }, 500);
  }

  $(document).ready(function () {
    version();
    getNotifications();
  });
//--></script></div>
{{ footer }}