Commit e2724f17 authored by David Metzler's avatar David Metzler
Browse files

Merge branch '7.x-4.x' of metzlerd@git.drupal.org:project/forena.git into 7.x-4.x

parents fcceb51f 85b643e3
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [
<!ENTITY nbsp "&#160;">
]>
......@@ -11,6 +11,11 @@
</frx:parameters>
<frx:docgen>
</frx:docgen>
<frx:fields>
</frx:fields>
<frx:menu/>
<frx:cache/>
<style/>
</head>
<body>
</body>
......
......@@ -140,8 +140,8 @@ function forena_settings() {
$form['forena_report_repos'] = array(
'#type' => 'textfield',
'#title' => t('Report Repository'),
'#description' => t('Indicate the directory that you want to use for your reports. In order for you to ' .
'to be able to save reports, this directory should be writable by the web user. Relative' .
'#description' => t('Indicate the directory that you want to use for storing your report sources (frx files). In order for you ' .
'to be able to save report sources, this directory should be writable by the web user. Relative ' .
'paths should be entered relative to the base path of your drupal installation.'),
'#default_value' => $report_path,
);
......@@ -155,10 +155,9 @@ function forena_settings() {
$form['forena_query_data_path'] = array(
'#type' => 'textfield',
'#title' => t('Custom Data Block Repository'),
'#description' => t('Indicate the directory that you want to use to save custom created data blocks using
the forena query builder tool. These will override any module delivered data blocks. This needs to
be a directory that is writable by the web user but should not be browsable by the web. It defaults to
'),
'#description' => t('Indicate the directory that you want to use to save custom created data blocks (SQLs or
XMLs) using the forena query builder tool. These will override any module delivered data blocks. This
needs to be a directory that is writable by the web user but should not be browsable by the web.'),
'#default_value' => Frx::DataFile()->dir,
);
......@@ -190,41 +189,46 @@ function forena_settings_validate($form, &$form_state) {
if ($path != $values['forena_last_report_path']) {
if (!file_exists($path)) {
try {
mkdir($path);
if (file_exists($path)) {
drupal_set_message(t('Created directory %s', array('%s' => $path))) ;
drupal_set_message(t('Created Report Directory %s', array('%s' => $path))) ;
}
mkdir($path);
} catch (Exception $e) {
Frx::error(t('Unable to create report directory'), $e->getMessage());
Frx::error(t('Unable to create Report Directory'), $e->getMessage());
}
}
}
if (!file_exists($path) || !is_writable($path)) {
form_set_error('forena_report_repos', 'Report Directory must be writable by the web user');
if (!file_exists($path)) {
form_set_error('forena_report_repos', t('Report Directory (') . $path . t(') does not exist'));
}
else {
if (!is_writable($path)) {
form_set_error('forena_report_repos', t('Report Directory (') . $path . t(') must be writable by the web user'));
}
}
if (isset($values['forena_query_data_path'])) {
$path = $values['forena_query_data_path'];
if ($path != $values['forena_last_query_data_path']) {
if (!file_exists($path)) {
try {
mkdir($path);
if (file_exists($path)) {
drupal_set_message(t('Created directory %s', array('%s' => $path))) ;
drupal_set_message(t('Created Custom Data Block Directory %s', array('%s' => $path))) ;
}
} catch (Exception $e) {
Frx::error(t('Unable to create data directory'), $e->getMessage());
Frx::error(t('Unable to create Custom Data Block Directory'), $e->getMessage());
}
}
}
if (!file_exists($path) || !is_writable($path)) {
form_set_error('forena_query_data_path', 'Data Directory must be writable by the web user');
if (!file_exists($path)) {
form_set_error('forena_query_data_path', t('Custom Data Block Directory (') . $path . t(') does not exist'));
}
else {
if (!is_writable($path)) {
form_set_error('forena_query_data_path', t('Custom Data Block Directory (') . $path . t(') must be writable by the web user'));
}
}
}
}
......
<?php
/**
* @file forena.data.inc
* Common files for diplaying and previewing data blocks.
* Common files for displaying and previewing data blocks.
*/
function forena_display_blocks() {
$header = array(t('Block'), t('Access'), t('Keywords'), t('Actions'));
$blocks = Frx::BlockEditor()->revertDBBLocks();
$blocks = Frx::DataFile()->userBlocks();
$links[] = array('href' => 'admin/structure/forena/data/add', 'title' => 'Create New SQL Query)' );
$links[] = array('href' => 'admin/structure/forena/data/add', 'title' => 'Create New SQL Query' );
$content['add']['#markup'] = theme('links',
array(
'links' => $links,
......
......@@ -8,29 +8,12 @@
<frx:category>Drupal Administration</frx:category>
<frx:options hidden="1" />
<frx:parameters>
<frx:parm id="name" label="User Name" require="1" desc=""
data_source="" data_field="" type="" />
<frx:parm id="search" label="Search" require="0" desc=""
data_source="" data_field="" type="">school</frx:parm>
</frx:parameters>
<frx:fields>
<frx:field id="details" link="admin/reports/event/{wid}">Details</frx:field>
<frx:field id="total" link="reports/DrupalUserLogs?name={name}"
format="date" format_string="" />
<frx:field id="name">Anonymous</frx:field>
<frx:field id="timestamp" format="drupal_date_format"
format-string="small" />
<frx:field id="created" format="drupal_date_format"
format-string="small" />
</frx:fields>
<frx:docgen />
</head>
<body>
<div id="forena-1" frx:block="drupal/users_in_logs">
<h4>Log Entries for {name}</h4>
</div>
<div>
<p>This report is obsolete and will be removed in the next major release</p>
</div>
<p>This report is obsolete and will be removed in the next major release</p>
</body>
</html>
......@@ -12,16 +12,6 @@
<frx:docgen />
<frx:fields/><frx:menu/><frx:cache/></head>
<body>
<div frx:block="sampledb/states"/>
<div>
<p>This sample report demonstrates the use of a custom control.
In this case, the FrxSource control overrides the rendering of the
the div tag to make sure that it gets rendered as properly escaped
html. Custom renderers like these can be used to extend forena
reports with custom rendering controls tailored to a specific
domain. This mechanism is how we plan to add graphing support to
Forena Reports.</p>
</div>
<div frx:renderer="FrxSource"></div>
<p>This report is obsolete and will be removed in the next major release</p>
</body>
</html>
\ No newline at end of file
......@@ -19,11 +19,10 @@
the detail report. In this case state. You can override these by
passing in a where clause in the query.</p>
</div>
<div frx:block="sampledb/users_by_state" id="forena-1" class="FrxSVGGraph"
frx:clause="order by name">
<div frx:block="sampledb/users_by_state">
<div frx:foreach="*" id="state">
<h3>{name}</h3>
<div frx:block="sampledb/distribution" id="dist">
<div frx:block="sampledb/distribution">
<table>
<thead>
<tr>
......@@ -32,7 +31,7 @@
</tr>
</thead>
<tbody>
<tr frx:foreach="*" id="forena-3">
<tr frx:foreach="*">
<td>{city}</td>
<td>{users}</td>
</tr>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment