123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <div style="padding:0 20px;">
- <h1>泉心泉意</h1>
- <div class="row">
- <div class="col-md-6">
- <div class="list-group">
- <a href="#" class="list-group-item active">
- 允许注册人数
- </a>
- <a href="#" class="list-group-item">总:{$auth.total}人</a>
- <a href="#" class="list-group-item">男:{$auth.man}人</a>
- <a href="#" class="list-group-item">女:{$auth.woman}人</a>
- </div>
- </div>
- <div class="col-md-6">
- <div class="list-group">
- <a href="#" class="list-group-item active">
- 已注册成功人数
- </a>
- <a href="#" class="list-group-item">总:{$user.total}人</a>
- <a href="#" class="list-group-item">男:{$user.man}人</a>
- <a href="#" class="list-group-item">女:{$user.woman}人</a>
- </div>
- </div>
- <div class="col-md-6">
- <div class="list-group">
- <a href="#" class="list-group-item active">
- 相恋情况
- </a>
- <a href="#" class="list-group-item">配对:{$config.select_num}人</a>
- <a href="#" class="list-group-item">结婚:{$config.marry_num}人</a>
- <a href="#" class="list-group-item">领奖:{$config.lottery_num}人</a>
- </div>
- </div>
- </div>
- </div>
- <include file="public@header"/>
- <hook name="admin_before_head_end"/>
- </head>
- <body>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <php>
- $lang_set=defined('LANG_SET')?LANG_SET:'';
- $thinkcmf_version=cmf_version();
- </php>
- <script>
- Wind.css('dragula');
- Wind.use('masonry', 'imagesloaded', 'dragula', function () {
- var $homeGrid = $('.home-grid').masonry({
- // set itemSelector so .grid-sizer is not used in layout
- itemSelector: '.grid-item',
- // use element for option
- columnWidth: '.grid-sizer',
- percentPosition: true,
- horizontalOrder: false,
- transitionDuration: 0
- });
- $homeGrid.masonry('on', 'layoutComplete', function (event, laidOutItems) {
- });
- $homeGrid.masonry();
- var containers = [];
- $('.home-grid .grid-item').each(function () {
- containers.push(this);
- });
- dragula(containers, {
- isContainer: function (el) {
- return false; // only elements in drake.containers will be taken into account
- },
- moves: function (el, source, handle, sibling) {
- return true; // elements are always draggable by default
- },
- accepts: function (el, target, source, sibling) {
- return true; // elements can be dropped in any of the `containers` by default
- },
- invalid: function (el, handle) {
- return false; // don't prevent any drags from initiating by default
- },
- direction: 'vertical', // Y axis is considered when determining where an element would be dropped
- copy: false, // elements are moved by default, not copied
- copySortSource: false, // elements in copy-source containers can be reordered
- revertOnSpill: false, // spilling will put the element back where it was dragged from, if this is true
- removeOnSpill: false, // spilling will `.remove` the element, if this is true
- mirrorContainer: document.body, // set the element that gets mirror elements appended
- ignoreInputTextSelection: true // allows users to select input text, see details below
- }).on('drop', function (el, target, source, sibling) {
- var $target = $(target);
- var targetClasses = $target.attr('class');
- var targetDataWidget = $target.data('widget');
- var targetDataSystem = $target.data('system');
- var $source = $(source);
- var sourceClasses = $source.attr('class');
- var sourceDataWidget = $source.data('widget');
- var sourceDataSystem = $source.data('system');
- $(source).append($(target).find('.dashboard-box').not('.gu-transit'));
- $(target).append(el);
- $target.attr('class', sourceClasses);
- $target.data('widget', sourceDataWidget);
- $target.data('system', sourceDataSystem);
- $source.attr('class', targetClasses);
- $source.data('widget', targetDataWidget);
- $source.data('system', targetDataSystem);
- $homeGrid.masonry();
- _widgetSort();
- }).on('shadow', function (el, container, source) {
- $homeGrid.masonry();
- });
- });
- function _widgetSort() {
- var widgets = [];
- $('.home-grid .grid-item').each(function () {
- var $this = $(this);
- widgets.push({
- name: $this.data('widget'),
- is_system: $this.data('system')
- });
- });
- $.ajax({
- url: "{:url('main/dashboardWidget')}",
- type: 'post',
- dataType: 'json',
- data: {widgets: widgets},
- success: function (data) {
- },
- error: function () {
- },
- complete: function () {
- }
- });
- }
- //获取官方通知
- $.getJSON("//www.thinkcmf.com/service/sms_jsonp.php?lang={$lang_set}&v={$thinkcmf_version}&callback=?",
- function (data) {
- var tpl = '<li><em class="title"></em><span class="content"></span></li>';
- var $notices = $("#thinkcmf-notices");
- $notices.empty();
- if (data.length > 0) {
- $('#thinkcmf-notices-grid').show();
- $.each(data, function (i, n) {
- var $tpl = $(tpl);
- $(".title", $tpl).html(n.title);
- $(".content", $tpl).html(n.content);
- $notices.append($tpl);
- });
- } else {
- $notices.append("<li>^_^,{:lang('NO_NOTICE')}~~</li>");
- }
- });
- </script>
- <hook name="admin_before_body_end"/>
- </body>
- </html>
|