Show edited and created datasets on user profile/dashboard
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,22 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
+ <component name="BookmarkManager">
+ <bookmark url="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/read.rdf" line="71" />
+ </component>
<component name="ChangeListManager">
<list default="true" id="89ace156-8d75-43de-ba53-6e829c197435" name="Default" comment="">
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.rst" afterPath="$PROJECT_DIR$/README.rst" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/ckanext/datagovau/templates/package/resource_read.html" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/ckanext/datagovau/templates/package/read.rdf" afterPath="$PROJECT_DIR$/ckanext/datagovau/templates/package/read.rdf" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/ckanext/datagovau/templates/package/read_base.html" afterPath="$PROJECT_DIR$/ckanext/datagovau/templates/package/read_base.html" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="ckanext-datagovau.iws" />
<ignored path=".idea/workspace.xml" />
- <file path="/Dummy.txt" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378710608503" ignored="false" />
- <file path="/plugin.py" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378709809996" ignored="false" />
+ <file path="/Dummy.txt" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378773145747" ignored="false" />
+ <file path="/plugin.py" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378731005672" ignored="false" />
<file path="/setup.py" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378168657134" ignored="false" />
- <file path="/package_basic_fields.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378705320245" ignored="false" />
- <file path="/package_metadata_fields.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378701829955" ignored="false" />
- <file path="/read_base.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378179756405" ignored="false" />
- <file path="/read.rdf" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378709644530" ignored="false" />
+ <file path="/package_basic_fields.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378727992485" ignored="false" />
+ <file path="/package_metadata_fields.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378729194397" ignored="false" />
+ <file path="/read_base.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378774943838" ignored="false" />
+ <file path="/read.rdf" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378775057466" ignored="false" />
<file path="/README.rst" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378703724236" ignored="false" />
<file path="/a.dummy" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378689054922" ignored="false" />
- <file path="/read.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378702039287" ignored="false" />
+ <file path="/read.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378721657045" ignored="false" />
<file path="/create.py" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378705719051" ignored="false" />
+ <file path="/additional_info.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378717234941" ignored="false" />
+ <file path="/resource_read.html" changelist="89ace156-8d75-43de-ba53-6e829c197435" time="1378775248415" ignored="false" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -80,52 +88,34 @@
<file leaf-file-name="package_metadata_fields.html" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_metadata_fields.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="13" column="0" selection-start="439" selection-end="439" vertical-scroll-proportion="-8.125">
+ <state line="35" column="74" selection-start="1081" selection-end="1081" vertical-scroll-proportion="-20.875">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="plugin.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/ckanext/datagovau/plugin.py">
+ <file leaf-file-name="read_base.html" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/read_base.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="15" column="45" selection-start="378" selection-end="378" vertical-scroll-proportion="0.0">
+ <state line="11" column="0" selection-start="247" selection-end="1668" vertical-scroll-proportion="-6.875">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="package.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/controllers/package.py">
+ <file leaf-file-name="resource_read.html" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/resource_read.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="1124" column="45" selection-start="46939" selection-end="46947" vertical-scroll-proportion="0.0">
+ <state line="14" column="89" selection-start="580" selection-end="580" vertical-scroll-proportion="0.30837005">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="read.rdf" pinned="false" current="true" current-in-tab="true">
+ <file leaf-file-name="read.rdf" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/read.rdf">
<provider selected="true" editor-type-id="text-editor">
- <state line="34" column="31" selection-start="1911" selection-end="1911" vertical-scroll-proportion="0.55921054">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="get.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/logic/action/get.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="978" column="29" selection-start="30370" selection-end="30823" vertical-scroll-proportion="0.0">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="helpers.py" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/lib/helpers.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="617" column="20" selection-start="20720" selection-end="20720" vertical-scroll-proportion="0.0">
+ <state line="47" column="50" selection-start="2578" selection-end="2596" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -152,22 +142,25 @@
<option value="$PROJECT_DIR$/ckanext/datagovau/theme/templates/layout.html" />
<option value="$PROJECT_DIR$/ckanext/datagovau/forms.py" />
<option value="$PROJECT_DIR$/setup.py" />
- <option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/read_base.html" />
- <option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/read.html" />
<option value="$PROJECT_DIR$/README.rst" />
<option value="$PROJECT_DIR$/ckanext/datagovau/theme/public/licenses.json" />
+ <option value="$PROJECT_DIR$/../ckan/ckan/logic/action/create.py" />
+ <option value="$PROJECT_DIR$/../ckan/ckan/templates/package/snippets/additional_info.html" />
+ <option value="$PROJECT_DIR$/../ckan/ckan/templates/package/read_base.html" />
+ <option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/read.html" />
+ <option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_basic_fields.html" />
<option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_metadata_fields.html" />
- <option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_basic_fields.html" />
- <option value="$PROJECT_DIR$/../ckan/ckan/logic/action/create.py" />
+ <option value="$PROJECT_DIR$/ckanext/datagovau/plugin.py" />
+ <option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/read_base.html" />
<option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/read.rdf" />
- <option value="$PROJECT_DIR$/ckanext/datagovau/plugin.py" />
+ <option value="$PROJECT_DIR$/ckanext/datagovau/templates/package/resource_read.html" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
- <option name="x" value="1279" />
- <option name="width" value="1922" />
- <option name="height" value="1084" />
+ <option name="x" value="1280" />
+ <option name="width" value="1920" />
+ <option name="height" value="1080" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
@@ -195,7 +188,6 @@
<sortByType />
</navigator>
<panes>
- <pane id="PackagesPane" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
@@ -347,6 +339,7 @@
</PATH>
</subPane>
</pane>
+ <pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
@@ -354,13 +347,34 @@
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="MemberChooser.sorted" value="false" />
- <property name="last_opened_file_path" value="$PROJECT_DIR$/../ckan/ckan/logic/action/get.py" />
+ <property name="last_opened_file_path" value="$PROJECT_DIR$/../ckan/ckan/templates/package/resource_read.html" />
<property name="MemberChooser.showClasses" value="true" />
+ <property name="DefaultHtmlFileTemplate" value="Html5" />
<property name="GoToClass.includeLibraries" value="false" />
- <property name="DefaultHtmlFileTemplate" value="Html5" />
<property name="MemberChooser.copyJavadoc" value="false" />
</component>
+ <component name="PyConsoleOptionsProvider">
+ <option name="myPythonConsoleState">
+ <PyConsoleSettings />
+ </option>
+ <option name="myDjangoConsoleState">
+ <PyConsoleSettings />
+ </option>
+ </component>
+ <component name="RecentsManager">
+ <key name="CopyFile.RECENT_KEYS">
+ <recent name="$PROJECT_DIR$/ckanext/datagovau/templates/package" />
+ </key>
+ </component>
<component name="RunManager">
+ <configuration default="true" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ <method />
+ </configuration>
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@@ -374,14 +388,6 @@
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
- <method />
- </configuration>
- <configuration default="true" type="Remote" factoryName="Remote">
- <option name="USE_SOCKET_TRANSPORT" value="true" />
- <option name="SERVER_MODE" value="false" />
- <option name="SHMEM_ADDRESS" value="javadebug" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
<method />
</configuration>
<configuration default="true" type="tests" factoryName="Unittests">
@@ -501,23 +507,24 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="1279" y="0" width="1922" height="1084" extended-state="6" />
+ <frame x="1280" y="0" width="1920" height="1080" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3290735" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3290735" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.16183448" sideWeight="0.7790822" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.16183448" sideWeight="0.7795527" order="0" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22044729" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22091782" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -565,7 +572,7 @@
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="false" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
- <option name="LAST_COMMIT_MESSAGE" />
+ <option name="LAST_COMMIT_MESSAGE" value="Update HTML package output to interim metadata standard" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
@@ -579,101 +586,102 @@
<option name="UPDATE_FILTER_BY_SCOPE" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ <MESSAGE value="Update HTML package output to interim metadata standard" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_basic_fields.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="11" column="24" selection-start="436" selection-end="436" vertical-scroll-proportion="-2.2297297">
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/base.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/macros/form.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="94" column="0" selection-start="4027" selection-end="4027" vertical-scroll-proportion="-21.333334" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/read.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/snippets/activity_item.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/package/read_base.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="24" column="50" selection-start="993" selection-end="998" vertical-scroll-proportion="0.42352942" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/model/activity.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/model/user.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/activity_streams/activity_stream_items.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="8" column="0" selection-start="560" selection-end="745" vertical-scroll-proportion="-5.0" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/model/package.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="481" column="51" selection-start="20096" selection-end="20104" vertical-scroll-proportion="0.33258173" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckanext/example_idatasetform/plugin.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="35" column="35" selection-start="1320" selection-end="1320" vertical-scroll-proportion="-1.2697369" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/common.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="9" column="0" selection-start="331" selection-end="331" vertical-scroll-proportion="0.14802632" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/package/activity.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="7" column="27" selection-start="318" selection-end="343" vertical-scroll-proportion="0.11824324" />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/lib/helpers.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="617" column="20" selection-start="20720" selection-end="20720" vertical-scroll-proportion="0.0">
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_basic_fields.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.0">
<folding />
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/package/snippets/package_metadata_fields.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="21" column="0" selection-start="1147" selection-end="1147" vertical-scroll-proportion="-0.625" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/model/package.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="209" column="0" selection-start="7434" selection-end="7434" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
<entry file="file://$PROJECT_DIR$/../ckan/ckan/logic/action/get.py">
<provider selected="true" editor-type-id="text-editor">
- <state line="978" column="29" selection-start="30370" selection-end="30823" vertical-scroll-proportion="0.0">
+ <state line="758" column="37" selection-start="24462" selection-end="24462" vertical-scroll-proportion="-6.6" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/logic/schema.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="172" column="0" selection-start="7641" selection-end="7641" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/lib/navl/validators.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/logic/converters.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="33" column="0" selection-start="391" selection-end="1056" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/plugin.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="106" column="0" selection-start="4140" selection-end="4271" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_metadata_fields.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="35" column="74" selection-start="1081" selection-end="1081" vertical-scroll-proportion="-20.875">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/../ckan/ckan/controllers/package.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="1124" column="45" selection-start="46939" selection-end="46947" vertical-scroll-proportion="0.0">
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/read_base.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="0" selection-start="247" selection-end="1668" vertical-scroll-proportion="-6.875">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/snippets/package_metadata_fields.html">
- <provider selected="true" editor-type-id="text-editor">
- <state line="13" column="0" selection-start="439" selection-end="439" vertical-scroll-proportion="-8.125">
+ <entry file="file://$PROJECT_DIR$/../ckan/ckan/templates/package/resource_read.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="24" column="105" selection-start="970" selection-end="970" vertical-scroll-proportion="0.48018292">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ckanext/datagovau/plugin.py">
- <provider selected="true" editor-type-id="text-editor">
- <state line="15" column="45" selection-start="378" selection-end="378" vertical-scroll-proportion="0.0">
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/read.rdf">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="47" column="50" selection-start="2578" selection-end="2596" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/read.rdf">
- <provider selected="true" editor-type-id="text-editor">
- <state line="34" column="31" selection-start="1911" selection-end="1911" vertical-scroll-proportion="0.55921054">
+ <entry file="file://$PROJECT_DIR$/ckanext/datagovau/templates/package/resource_read.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="14" column="89" selection-start="580" selection-end="580" vertical-scroll-proportion="0.30837005">
<folding />
</state>
</provider>
--- a/ckanext/datagovau/plugin.py
+++ b/ckanext/datagovau/plugin.py
@@ -1,21 +1,29 @@
import logging
import ckan.plugins as plugins
+import ckan.lib as lib
+import ckan.lib.dictization.model_dictize as model_dictize
import ckan.plugins.toolkit as tk
+import ckan.model as model
+#parse the activity feed for last active non-system user
+def get_last_active_user(id):
+ system_user = "de0ba262-83fe-45e2-adda-41bb9f0c86d8"
+ user_list = [x for x in lib.helpers.get_action('package_activity_list',{'id':id}) if x['user_id'] != system_user]
+ user = user_list[0]['user_id']
+ if user is None:
+ return lib.helpers.get_action('user_show',{'id':system_user})
+ else:
+ return lib.helpers.get_action('user_show',{'id':user})
-# get_action will be deprecated soon, this is the replacement
-def get_user(user):
- user_name = unicode(user)
- if user_name:
- user_obj = model.User.get(id)
- context['user_obj'] = user_obj
- if user_obj is None:
- raise NotFound
- else:
- raise NotFound
-
- return model_dictize.user_dictize(user_obj,context)
+# get user created datasets and those they have edited
+def get_user_datasets(user_dict):
+ created_datasets_list = user_dict['datasets']
+ active_datasets_id_list = [x['data']['package'] for x in
+ lib.helpers.get_action('user_activity_list',{'id':user_dict['id']}) if x['data'].get('package')]
+ active_datasets_list = active_datasets_id_list #if you need more detail, fetch each dataset here
+ print active_datasets_list
+ return created_datasets_list + active_datasets_list
class ExampleIDatasetFormPlugin(plugins.SingletonPlugin,
@@ -53,7 +61,7 @@
# config['licenses_group_url'] = 'http://%(ckan.site_url)/licenses.json'
def get_helpers(self):
- return {'getuser': get_user}
+ return {'get_last_active_user': get_last_active_user, 'get_user_datasets': get_user_datasets}
def is_fallback(self):
# Return True to register this plugin as the default handler for
--- a/ckanext/datagovau/templates/package/read.html
+++ b/ckanext/datagovau/templates/package/read.html
@@ -1,44 +1,167 @@
{% ckan_extends %}
{% block package_additional_info %}
-{{ super() }}
+<section class="additional-info" xmlns:dcat="http://www.w3.org/ns/dcat#"
+ xmlns:dcam="http://purl.org/dc/dcam/"
+ xmlns:aglsterms="http://www.agls.gov.au/agls/terms/"
+ xmlns:agentterms="http://www.agls.gov.au/agls/agentterms/"
+ xmlns:availterms="http://www.agls.gov.au/agls/availterms/"
+ xmlns:adminterms="http://www.agls.gov.au/agls/adminterms/"
+ xmlns:dct="http://purl.org/dc/terms/">
+ <h3>{{ _('Additional Info') }}</h3>
+ <table class="table table-striped table-bordered table-condensed">
+ <thead>
+ <tr>
+ <th scope="col">{{ _('Field') }}</th>
+ <th scope="col">{{ _('Value') }}</th>
+ </tr>
+ </thead>
+ <tbody>
-{# Add our custom field to the dataset read page. #}
-{% if pkg.get('agency_program') %}
-<section class="resources module-content">
- <p><strong>Agency Program</strong>: {{ pkg.agency_program }}</p>
+
+ {# Add our custom field to the dataset read page. #}
+ {% if pkg.get('metadata_created') %}
+ <tr>
+ <th scope="row" class="dataset-label">Date Published</th>
+ <td class="dataset-details" property="dct:issued">{{ pkg.metadata_created.split("T")[0] }}</td>
+ </tr>
+ {% endif %}
+ {% if pkg.get('metadata_updated') %}
+ <tr>
+ <th scope="row" class="dataset-label">Date Updated</th>
+ <td class="dataset-details" property="dct:updated">{{ pkg.metadata_updated.split("T")[0] }}</td>
+ </tr>
+ {% endif %}
+ {% if pkg.get('agency_program') %}
+ <tr>
+ <th scope="row" class="dataset-label">Agency Program</th>
+ <td class="dataset-details"> {{ pkg.agency_program }}</td>
+ </tr>
+ {% endif %}
+ {% if pkg.get('Agency Program') %}
+ <tr>
+ <th scope="row" class="dataset-label">Agency Program</th>
+ <td class="dataset-details"> {{ pkg.get('Agency Program') }}</td>
+ </tr>
+ {% endif %}
+ {% if h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI') %}
+ <tr>
+ <th scope="row" class="dataset-label">{{ _('Source') }}</th>
+ <td class="dataset-details" property="dct:source">{{ h.link_to(h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI'),
+ h.get_pkg_dict_extra(pkg,'DCTERMS.Source.URI'), rel='dct:source', target='_blank') }}
+ </td>
+ </tr>
+ {% endif %}
+